Skip to content

Commit

Permalink
Upgrade useId to alpha channel (#22674)
Browse files Browse the repository at this point in the history
  • Loading branch information
acdlite committed Nov 1, 2021
1 parent 75f3dde commit 5cccacd
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
Expand Up @@ -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>;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/__tests__/ReactDOMUseId-test.js
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion packages/react/index.classic.fb.js
Expand Up @@ -40,7 +40,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/index.experimental.js
Expand Up @@ -36,7 +36,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/index.js
Expand Up @@ -61,7 +61,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/index.modern.fb.js
Expand Up @@ -39,7 +39,7 @@ export {
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/index.stable.js
Expand Up @@ -29,7 +29,7 @@ export {
lazy,
memo,
startTransition,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/React.js
Expand Up @@ -126,6 +126,6 @@ export {
REACT_CACHE_TYPE as unstable_Cache,
// enableScopeAPI
REACT_SCOPE_TYPE as unstable_Scope,
useId as unstable_useId,
useId,
act,
};
2 changes: 1 addition & 1 deletion packages/react/unstable-shared-subset.experimental.js
Expand Up @@ -27,7 +27,7 @@ export {
unstable_DebugTracingMode,
unstable_getCacheSignal,
unstable_getCacheForType,
unstable_useId,
useId,
useCallback,
useContext,
useDebugValue,
Expand Down

0 comments on commit 5cccacd

Please sign in to comment.