-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
style: Use useSyncExternalStore in the React adapter #723
base: next
Are you sure you want to change the base?
style: Use useSyncExternalStore in the React adapter #723
Conversation
@bartlangelaan is attempting to deploy a commit to the 47ng Team on Vercel. A member of the Team first needs to authorize it. |
Thanks, wow this is so much cleaner! I had heard of useSyncExternalStore, but it didn't occur to me to use it here, it sounds like a perfect use-case. Great job! |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I don't have time to test it today, so if you can't wait and want to test it, feel free! :-) |
Regarding the emitter, it's use is to make sure the |
commit: |
7a5fcba
to
6b2e0a2
Compare
This utilizes the
useSyncExternalStore
hook in the React adapter, which automatically takes care of rehydration errors.I'm unsure if it still works correctly, because this version does not use the emitter value anymore. It just gets it from the location every time. I will test it before marking it as ready.