pub(crate) unsafe fn update(&self, new_disposer: ScopeDisposer<'app>) {
        // Dispose of any old disposers
        if self.disposer.get().is_some() {
            let old_disposer_rc = self.disposer.take();
            let old_disposer_option = Rc::try_unwrap(old_disposer_rc).unwrap(); // See docs on `disposer` field
            let old_disposer = old_disposer_option.unwrap(); // We're in a conditional that checked this

            // SAFETY: This function is documented to be only called when we're not inside
            // the same scope as we're disposing of.
            old_disposer.dispose();
        }

        self.disposer.set(Some(new_disposer));
    }
Updates the undelrying data structure to hold the given disposer, taking
any previous disposer and disposing it.

# Safety
This must not be called inside the scope in which the previous disposer
was created.
packages/perseus/src/router/page_disposer.rs