You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance the ScopeProvider to allow selective store management. Specifically, add a store prop to ScopeProvider that would only apply to the atoms specified in the atoms prop. Atoms not listed would be managed by the parent store or the default store.
In complex applications, there's often a need to manage specific atoms in a custom store while leaving others to be managed by a parent or default store. The current implementation of using Provider and ScopeProvider together doesn't achieve this selective management.
For example, the following doesn't work as desired:
Proposed Change
Enhance the
ScopeProvider
to allow selective store management. Specifically, add astore
prop toScopeProvider
that would only apply to the atoms specified in theatoms
prop. Atoms not listed would be managed by the parent store or the default store.Motivation
In complex applications, there's often a need to manage specific atoms in a custom store while leaving others to be managed by a parent or default store. The current implementation of using
Provider
andScopeProvider
together doesn't achieve this selective management.For example, the following doesn't work as desired:
In this setup, all atoms are managed by
myStore
, not justatom1
andatom2
.The text was updated successfully, but these errors were encountered: