Skip to content

Commit 0579cfc

Browse files
authored
React 18 alias useId, unstable_useId and unstable_useOpaqueIdentifier (#76)
* Alias useId with useOpaqueIdentifier * Support unstable useId and useOpaqueIdentifier
1 parent a2660b4 commit 0579cfc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/internals/dispatcher.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ export const Dispatcher = {
332332
useTransition,
333333
useDeferredValue,
334334
useOpaqueIdentifier,
335+
// aliased for now
336+
// see: https://github.com/FormidableLabs/react-ssr-prepass/pull/75
337+
useId: useOpaqueIdentifier,
338+
unstable_useId: useOpaqueIdentifier,
339+
unstable_useOpaqueIdentifier: useOpaqueIdentifier,
335340
// ignore useLayout effect completely as usage of it will be caught
336341
// in a subsequent render pass
337342
useLayoutEffect: noop,

0 commit comments

Comments
 (0)