fn get_frozen_page_state_and_register<R>(&self, url: &PathMaybeWithLocale, is_widget: bool) -> Option<<R::Unrx as MakeRx>::Rx>
    where
        R: Clone + AnyFreeze + MakeUnrx,
        // We need this so that the compiler understands that the reactive version of the
        // unreactive version of `R` has the same properties as `R` itself
        <<R as MakeUnrx>::Unrx as MakeRx>::Rx: Clone + AnyFreeze + MakeUnrx,
    {
        let frozen_app_full = self.frozen_app.borrow();
        if let Some((frozen_app, thaw_prefs)) = &*frozen_app_full {
            // Check against the thaw preferences if we should prefer frozen state over
            // active state
            if thaw_prefs.page.should_use_frozen_state(url) {
                // Get the serialized and unreactive frozen state from the store
                match frozen_app.page_state_store.get(&url) {
                    Some(state_str) => {
                        // Deserialize into the unreactive version
                        let unrx = match serde_json::from_str::<R::Unrx>(state_str) {
                            Ok(unrx) => unrx,
                            // The frozen state could easily be corrupted, so we'll fall back to the
                            // active state (which is already reactive)
                            // We break out here to avoid double-storing this and trying to make a
                            // reactive thing reactive
                            Err(_) => return None,
                        };
                        // This returns the reactive version of the unreactive version of `R`, which
                        // is why we have to make everything else do the same
                        // Then we convince the compiler that that actually is `R` with the
                        // ludicrous trait bound at the beginning of this function
                        let rx = unrx.make_rx();
                        // And we do want to add this to the page state store (if this returns
                        // false, then this page was never supposed to receive state)
                        if !self.page_state_store.add_state(url, rx.clone(), is_widget) {
                            return None;
                        }
                        // Now we should remove this from the frozen state so we don't fall back to
                        // it again
                        drop(frozen_app_full);
                        let mut frozen_app_val = self.frozen_app.take().unwrap(); // We're literally in a conditional that checked this
                        frozen_app_val.0.page_state_store.remove(url);
                        let mut frozen_app = self.frozen_app.borrow_mut();
                        *frozen_app = Some(frozen_app_val);

                        Some(rx)
                    }
                    // If there's nothing in the frozen state, we'll fall back to the active state
                    None => self
                        .page_state_store
                        .get_state::<<R::Unrx as MakeRx>::Rx>(url),
                }
            } else {
                None
            }
        } else {
            None
        }
    }
An internal getter for the frozen state for the given page. When this is
called, it will also add any frozen state it finds to the page state
store, overriding what was already there.

**Warning:** if the page has already been registered in the page state
store as not being able to receive state, this will silently fail.
If this occurs, something has gone horribly wrong, and panics will
almost certainly follow. (Basically, this should *never* happen. If
you're not using the macros, you may need to be careful of this.)
packages/perseus/src/template/render_ctx.rs