fn register_global_state_value<R>(
        &self,
        state: TemplateStateWithType<R::Unrx>,
    ) -> Result<<R::Unrx as MakeRx>::Rx, ClientError>
    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,
    {
        // Deserialize it (we know nothing about the calling situation, so we assume it
        // could be invalid, hence the fallible return type)
        let unrx = state
            .to_concrete()
            .map_err(|err| ClientError::StateInvalid { source: err })?;
        let rx = unrx.make_rx();
        let mut active_global_state = self.global_state.0.borrow_mut();
        *active_global_state = GlobalStateType::Loaded(Box::new(rx.clone()));

        Ok(rx)
    }
Registers a serialized and unreactive state string as the new active
global state, returning a fully reactive version.
packages/perseus/src/template/render_ctx.rs