react/packages/use-sync-external-store
Andrew Clark 62cd5af08e
Codemod redundant async act scopes (#26350)
Prior to #26347, our internal `act` API (not the public API) behaved
differently depending on whether the scope function returned a promise
(i.e. was an async function), for historical reasons that no longer
apply. Now that this is fixed, I've codemodded all async act scopes that
don't contain an await to be sync.

No pressing motivation other than it looks nicer and the codemod was
easy. Might help avoid confusion for new contributors who see async act
scopes with nothing async inside and infer it must be like that for a
reason.
2023-03-08 16:40:23 -05:00
..
npm Upgrade useSyncExternalStore to alpha channel (#22662) 2021-10-31 15:38:03 -07:00
shim [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
src Codemod redundant async act scopes (#26350) 2023-03-08 16:40:23 -05:00
README.md Update some READMEs (#24290) 2022-04-07 02:35:01 +01:00
index.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
package.json bump versions for next release (#24725) 2022-06-14 13:24:00 -07:00
with-selector.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00

README.md

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.