Files
react/packages/use-sync-external-store
Jelle Voost c5eca9b082 Fixed useSyncExternalStoreWithSelector to update memoizedSnapshot on change (#25968)
## Summary

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->

A proposed fix for the bug described in
https://github.com/facebook/react/issues/25967

## How did you test this change?

See the issue linked above, test scenario included in the code sandbox:
https://codesandbox.io/s/fervent-ives-0vm9es?file=/src/App.jsx

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->
2024-07-12 23:57:45 -04:00
..
2022-04-07 02:35:01 +01:00

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.