-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Possible to do lazy splitting at time of hook usage? #108
Comments
I'm not sure we can do that, especially the Because of that, and because we can't bail out from rendering when using const count = useCounterContext(s => s.count);
// would be the same as
const { count } = useCounterContext(); |
Whoops didn’t mean to add the “No need for a Provider” part! |
Would this help? https://github.com/dai-shi/use-context-selector |
Looks like useContextSelector is officially proposed. |
Hi Diego! Thinking of using this in addition to or instead of zustand. One thing I like about zustand is that you can select from the state when you use the hook, like so:
Do you think it's possible to accomplish this with constate? Like this?
The text was updated successfully, but these errors were encountered: