-
Notifications
You must be signed in to change notification settings - Fork 61
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
[question] Why is the scheduler dependency required? #106
Comments
Because it is used in the code: use-context-selector/src/index.ts Line 19 in bd4eb74
You might be interested in reading the discussion in #100. |
I've read the code, but I don't understand why wrapping the listener callbacks with |
If you need to dive into it, you want to follow resources linked in https://github.com/dai-shi/will-this-react-global-state-work-in-concurrent-rendering. In reality, if you don't care much about the subtle behavior, you could implement much simpler version of |
Yeah I figured, I have a very minimal implementation here: https://gist.github.com/romgrk/a3dc5d3de5c011e0925b2f2aee14ee98 (if you have any comments, I'd be interested to hear)
Actually I do care about correctness, if you have any comments to make on the issues that could arise from not having the scheduler wrapper I'd be happy to hear. Otherwise, feel free to close this issue, and thanks for the replies. |
One small note is that Other than that, it should be "level 1". See reactwg/react-18#70 for levels. |
I was wondering if there was a way to remove it from the peer dependencies. Thanks.
The text was updated successfully, but these errors were encountered: