-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difficulty Managing Dynamic atomFamily
Instances in ScopeProvider
#50
Closed
Comments
I don't have any suggestions outside of the current tedious approach you mentioned above. Brainstorming: AtomFamily is a just a function but we can assume it returns atoms since we want to pass it in to atoms prop. Perhaps jotai-scope could expose a utility to scope functions.
Impl might look something like this:
|
This was referenced Jul 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm encountering challenges while managing dynamic
atomFamily
instances within theScopeProvider
.Currently, I'm unable to directly pass the entire
atomFamily
into the atom array ofScopeProvider
. Instead, I'm forced to extract each individual atom and pass them separately. This approach becomes cumbersome in my application, where I heavily rely onatomFamily
for its functionality. Manually tracking and passing every single atom instance is quite tedious and doesn't seem an option currently.Ideally, I'd like to pass an entire
atomFamily
group into theScopeProvider
.Is there a recommended approach to address this scenario? Any suggestions or workarounds would be greatly appreciated.
The text was updated successfully, but these errors were encountered: