Upgrade useId to alpha channel (#22674)
Andrew Clark committed
Nov 1, 2021 at 18:26 UTC
5cccacd131242bdea2c2fe4b33fac50d2e3132b4
9 files changed
+9
-9
packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js
+1
-1
@@ -600,7 +600,7 @@ describe('ReactHooksInspectionIntegration', () => {
600
601
it('should support useId hook', () => {
602
function Foo(props) {
603
- const id = React.unstable_useId();
603
+ const id = React.useId();
604
const [state] = React.useState('hello');
605
return <div id={id}>{state}</div>;
606
}
packages/react-dom/src/__tests__/ReactDOMUseId-test.js
+1
-1
@@ -34,7 +34,7 @@ describe('useId', () => {
34
ReactDOMFizzServer = require('react-dom/server');
35
Stream = require('stream');
36
Suspense = React.Suspense;
37
- useId = React.unstable_useId;
37
+ useId = React.useId;
38
39
// Test Environment
40
const jsdom = new JSDOM(
packages/react/index.classic.fb.js
+1
-1
@@ -40,7 +40,7 @@ export {
40
unstable_getCacheSignal,
41
unstable_getCacheForType,
42
unstable_useCacheRefresh,
43
- unstable_useId,
43
+ useId,
44
useCallback,
45
useContext,
46
useDebugValue,
packages/react/index.experimental.js
+1
-1
@@ -36,7 +36,7 @@ export {
36
unstable_getCacheSignal,
37
unstable_getCacheForType,
38
unstable_useCacheRefresh,
39
- unstable_useId,
39
+ useId,
40
useCallback,
41
useContext,
42
useDebugValue,
packages/react/index.js
+1
-1
@@ -61,7 +61,7 @@ export {
61
unstable_getCacheSignal,
62
unstable_getCacheForType,
63
unstable_useCacheRefresh,
64
- unstable_useId,
64
+ useId,
65
useCallback,
66
useContext,
67
useDebugValue,
packages/react/index.modern.fb.js
+1
-1
@@ -39,7 +39,7 @@ export {
39
unstable_getCacheSignal,
40
unstable_getCacheForType,
41
unstable_useCacheRefresh,
42
- unstable_useId,
42
+ useId,
43
useCallback,
44
useContext,
45
useDebugValue,
packages/react/index.stable.js
+1
-1
@@ -29,7 +29,7 @@ export {
29
lazy,
30
memo,
31
startTransition,
32
- unstable_useId,
32
+ useId,
33
useCallback,
34
useContext,
35
useDebugValue,
packages/react/src/React.js
+1
-1
@@ -126,6 +126,6 @@ export {
126
REACT_CACHE_TYPE as unstable_Cache,
127
// enableScopeAPI
128
REACT_SCOPE_TYPE as unstable_Scope,
129
- useId as unstable_useId,
129
+ useId,
130
act,
131
};
packages/react/unstable-shared-subset.experimental.js
+1
-1
@@ -27,7 +27,7 @@ export {
27
unstable_DebugTracingMode,
28
unstable_getCacheSignal,
29
unstable_getCacheForType,
30
- unstable_useId,
30
+ useId,
31
useCallback,
32
useContext,
33
useDebugValue,