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
Support for new React 18 hook - useSyncExternalStore #328
Comments
Hi @cliffordfajardo, Here we need to explain in detail: API level compatibility is not difficult, and the shim is also applicable to fre. https://github.com/yisar/fre/blob/master/demo/src/use-sync-external-store.tsx In addition to API compatibility, React uses this API to degrade the internal scheduling to micro tasks, which loses the concurrency ability, but ensures the consistency of rendering. Fre has the same defect. It may be useful to implement this API, but I don't think many libraries will use it in the short term. |
Came here because I wanted to use Xstate with a react alternative library. So that could be a use case. The @xstate/react package uses useSyncExternalStore |
I just wanted to put this as a place holder item for now
Some libraries that are using
useSyncExternalStore
already:react-query
: https://github.com/tannerlinsley/react-query/pull/3064/filesThe text was updated successfully, but these errors were encountered: