mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
* Move useSyncExternalStore shim to a nested entrypoint Also renames `useSyncExternalStoreExtra` to `useSyncExternalStoreWithSelector`. - 'use-sync-external-store/shim' -> A shim for `useSyncExternalStore` that works in React 16 and 17 (any release that supports hooks). The module will first check if the built-in React API exists, before falling back to the shim. - 'use-sync-external-store/with-selector' -> An extended version of `useSyncExternalStore` that also supports `selector` and `isEqual` options. It does _not_ shim `use-sync-external-store`; it composes the built-in React API. **Use this if you only support 18+.** - 'use-sync-external-store/shim/with-selector' -> Same API, but it composes `use-sync-external-store/shim` instead. **Use this for compatibility with 16 and 17.** - 'use-sync-external-store' -> Re-exports React's built-in API. Not meant to be used. It will warn and direct users to either the shim or the built-in API. * Upgrade useSyncExternalStore to alpha channel
26 lines
604 B
JSON
26 lines
604 B
JSON
{
|
|
"name": "use-sync-external-store",
|
|
"description": "Backwards compatible shim for React's useSyncExternalStore. Works with any React that supports hooks.",
|
|
"version": "0.0.1",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/facebook/react.git",
|
|
"directory": "packages/use-sync-external-store"
|
|
},
|
|
"files": [
|
|
"LICENSE",
|
|
"README.md",
|
|
"build-info.json",
|
|
"index.js",
|
|
"index.native.js",
|
|
"with-selector.js",
|
|
"with-selector.native.js",
|
|
"shim/",
|
|
"cjs/"
|
|
],
|
|
"license": "MIT",
|
|
"peerDependencies": {
|
|
"react": "^16.8.0 || ^17.0.0"
|
|
}
|
|
}
|