fn freeze(&self) -> String {
        let frozen_app = FrozenApp {
            global_state: self.global_state.0.borrow().freeze(),
            route: match &*self.router.get_load_state_rc().get_untracked() {
                RouterLoadState::Loaded { path, .. } => Some(path.clone()),
                RouterLoadState::Loading { path, .. } => Some(path.clone()),
                // If we encounter this during re-hydration, we won't try to set the URL in the
                // browser
                RouterLoadState::ErrorLoaded { .. } => None,
                RouterLoadState::Server => None,
            },
            page_state_store: self.page_state_store.freeze_to_hash_map(),
        };
        serde_json::to_string(&frozen_app).unwrap()
    }
'Freezes' the relevant parts of the render configuration to a serialized
`String` that can later be used to re-initialize the app to the same
state at the time of freezing.
packages/perseus/src/template/render_ctx.rs