atlassian / react-sweet-state

Shared state management solution for React
https://atlassian.github.io/react-sweet-state/
MIT License
871 stars 55 forks source link

Support childless global containers pattern #208

Closed albertogasparin closed 1 year ago

albertogasparin commented 1 year ago

The new Container implementation is lazy by default (does not create a store until a subscriber asks for it) but current implementation allows container to be mounted as sibling to initialise global stores.

So we add a test to ensure we still support this use case. That also found another scenario where isGlobal stores might get cleaned up accidentally