-
Notifications
You must be signed in to change notification settings - Fork 62
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
observedBits 32bit limitation #1
Comments
Option 1: we rotate the index. |
Assuming you abstract the implementation away from the user, I guess the decision criteria are (?)
I don’t know enough about the implementation of Context in the react codebase to know if #1 is a concern. It’s still not clear to me how we may subscribe to deep state or if that is even desirable considering we can receive a state change for the high level state but avoid re renders using things like memo() for functional components and useMemo for computed values. |
Thanks. I'm not sure either how much overhead creating hundreds of contexts leads. BTW, https://github.com/dai-shi/react-context-global-state is already taking the Option 3 approach. |
something like this? 11_deep / Person.tsx
|
Yeah, that's exactly what I had in mind for useMemo. |
Option 4: we pass non-updating "store" in the context, and let hooks subscribe for key-based changes. This is mostly like the previous implementation which requires |
Turns out that the current implementation already takes the option 1 approach. |
Discussion from https://link.medium.com/gXvqudhDNR
The text was updated successfully, but these errors were encountered: