use-sync-external-store
Advanced tools
Comparing version 0.0.0-experimental-aa8f2bdbc-20211215 to 0.0.0-experimental-aec575914-20220529
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-shim.development.js | ||
@@ -118,3 +119,5 @@ * | ||
if (!didWarnUncachedGetSnapshot) { | ||
if (value !== getSnapshot()) { | ||
var cachedValue = getSnapshot(); | ||
if (!objectIs(value, cachedValue)) { | ||
error('The result of getSnapshot should be cached to avoid an infinite loop'); | ||
@@ -121,0 +124,0 @@ |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-shim.native.development.js | ||
@@ -118,3 +119,5 @@ * | ||
if (!didWarnUncachedGetSnapshot) { | ||
if (value !== getSnapshot()) { | ||
var cachedValue = getSnapshot(); | ||
if (!objectIs(value, cachedValue)) { | ||
error('The result of getSnapshot should be cached to avoid an infinite loop'); | ||
@@ -121,0 +124,0 @@ |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-shim.native.production.min.js | ||
@@ -3,0 +4,0 @@ * |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-shim.production.min.js | ||
@@ -3,0 +4,0 @@ * |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-shim/with-selector.development.js | ||
@@ -3,0 +4,0 @@ * |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-shim/with-selector.production.min.js | ||
@@ -3,0 +4,0 @@ * |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-with-selector.development.js | ||
@@ -3,0 +4,0 @@ * |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store-with-selector.production.min.js | ||
@@ -3,0 +4,0 @@ * |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store.development.js | ||
@@ -69,3 +70,3 @@ * | ||
{ | ||
error("The main 'use-sync-external-store' entry point is not supported; all it " + "does is re-export useSyncExternalStore from the 'react' package, so " + 'it only works with React 18+.' + '\n\n' + 'If you wish to support React 16 and 17, import from ' + "'use-sync-external-store/shim' instead. It will fall back to a shimmed" + 'implementation when the native one is not available.' + '\n\n' + "If you only support React 18+, you can import directly from 'react'."); | ||
error("The main 'use-sync-external-store' entry point is not supported; all it " + "does is re-export useSyncExternalStore from the 'react' package, so " + 'it only works with React 18+.' + '\n\n' + 'If you wish to support React 16 and 17, import from ' + "'use-sync-external-store/shim' instead. It will fall back to a shimmed " + 'implementation when the native one is not available.' + '\n\n' + "If you only support React 18+, you can import directly from 'react'."); | ||
} | ||
@@ -72,0 +73,0 @@ |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* use-sync-external-store.production.min.js | ||
@@ -3,0 +4,0 @@ * |
{ | ||
"name": "use-sync-external-store", | ||
"description": "Backwards compatible shim for React's useSyncExternalStore. Works with any React that supports hooks.", | ||
"version": "0.0.0-experimental-aa8f2bdbc-20211215", | ||
"version": "0.0.0-experimental-aec575914-20220529", | ||
"repository": { | ||
@@ -13,3 +13,2 @@ "type": "git", | ||
"README.md", | ||
"build-info.json", | ||
"index.js", | ||
@@ -24,4 +23,4 @@ "index.native.js", | ||
"peerDependencies": { | ||
"react": "0.0.0-experimental-aa8f2bdbc-20211215" | ||
"react": "0.0.0-experimental-aec575914-20220529" | ||
} | ||
} |
# use-sync-external-store | ||
Backwards compatible shim for React's `useSyncExternalStore`. Works with any React that supports hooks. | ||
Backwards-compatible shim for [`React.useSyncExternalStore`](https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore). Works with any React that supports Hooks. | ||
Until `useSyncExternalStore` is documented, refer to https://github.com/reactwg/react-18/discussions/86 | ||
See also https://github.com/reactwg/react-18/discussions/86. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
38086
816
0