pub fn init_state<S: DeserializeOwned>(
    state: &OptionalCell<S>,
    init_state: &JsValue
) -> bool