saus
saus copied to clipboard
Unmountable global state provided by routes
Routes could provide global state (avoiding the need for prop drilling) that can be unmounted by the client router whenever a page is primed for garbage collection.
Possible API
- pass state modules to
globaloption ofroutedeclaration - add a
releaseclient-side method to state modules? - add a client-side function for releasing all state modules used by a specific page module