mirror of
https://github.com/facebook/react.git
synced 2026-02-26 01:44:59 +00:00
Cleanup enableUseRefAccessWarning flag I don't think this flag has a path forward in the current implementation. The detection by stack trace is too brittle to detect the lazy initialization pattern reliably (see e.g. some internal tests that expect the warning because they use lazy intialization, but a slightly different pattern then the expected pattern. I think a new version of this could be to fully ban ref access during render with an alternative API for the exceptional cases that today require ref access during render.
use-sync-external-store
Backwards-compatible shim for React.useSyncExternalStore. Works with any React that supports Hooks.
See also https://github.com/reactwg/react-18/discussions/86.