saus icon indicating copy to clipboard operation
saus copied to clipboard

Unmountable global state provided by routes

Open aleclarson opened this issue 3 years ago • 0 comments

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 global option of route declaration
  • add a release client-side method to state modules?
  • add a client-side function for releasing all state modules used by a specific page module

aleclarson avatar Apr 18 '22 19:04 aleclarson