Files
react/packages/use-sync-external-store
Andrew Clark 06f98c1680 Implement useSyncExternalStore in Fiber (#22239)
This adds an initial implementation of useSyncExternalStore to the
fiber reconciler. It's mostly a copy-paste of the userspace
implementation, which is not ideal but is a good enough starting place.

The main change we'll want to make to this native implementation is to
move the tearing checks from the layout phase to an earlier, pre-commit
phase so that code that runs in the commit phase always observes a
consistent tree.

Follow-ups:

- Implement in Fizz
- Implement in old SSR renderer
- Implement in react-debug-hooks
2021-09-07 10:22:05 -07:00
..

use-sync-external-store

Backwards compatible shim for React's useSyncExternalStore. Works with any React that supports hooks.

Until useSyncExternalStore is documented, refer to https://github.com/reactwg/react-18/discussions/86