Skip to content

Commit e336276

Browse files
committed
[useSES shim] Import prefixed native API
Until useSyncExternalStore is finalized, the shim should import the prefixed version (unstable_useSyncExternalStore), which is available in the experimental builds. That way our early testers can start using it.
1 parent fd5e01c commit e336276

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/use-sync-external-store/src/useSyncExternalStore.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const {
1717
useEffect,
1818
useLayoutEffect,
1919
useDebugValue,
20-
useSyncExternalStore: builtInAPI,
20+
// The built-in API is still prefixed.
21+
unstable_useSyncExternalStore: builtInAPI,
2122
} = React;
2223

2324
// Prefer the built-in API, if it exists. If it doesn't exist, then we assume

0 commit comments

Comments
 (0)