Upgrade useId to alpha channel (#22674)

This commit is contained in:
Andrew Clark
2021-11-01 15:26:42 -07:00
committed by GitHub
parent 75f3ddebfa
commit 5cccacd131
9 changed files with 9 additions and 9 deletions
@@ -600,7 +600,7 @@ describe('ReactHooksInspectionIntegration', () => {
it('should support useId hook', () => {
function Foo(props) {
const id = React.unstable_useId();
const id = React.useId();
const [state] = React.useState('hello');
return <div id={id}>{state}</div>;
}
+1 -1
View File
@@ -34,7 +34,7 @@ describe('useId', () => {
ReactDOMFizzServer = require('react-dom/server');
Stream = require('stream');
Suspense = React.Suspense;
useId = React.unstable_useId;
useId = React.useId;
// Test Environment
const jsdom = new JSDOM(
+1 -1
View File
@@ -40,7 +40,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
+1 -1
View File
@@ -36,7 +36,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
+1 -1
View File
@@ -61,7 +61,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
+1 -1
View File
@@ -39,7 +39,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
+1 -1
View File
@@ -29,7 +29,7 @@ export {
lazy,
memo,
startTransition,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
+1 -1
View File
@@ -126,6 +126,6 @@ export {
REACT_CACHE_TYPE as unstable_Cache,
// enableScopeAPI
REACT_SCOPE_TYPE as unstable_Scope,
useId as unstable_useId,
useId,
act,
};
@@ -27,7 +27,7 @@ export {
unstable_DebugTracingMode,
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,