Skip to content

Commit

Permalink
Upgrade useId to alpha channel (facebook#22674)
Browse files Browse the repository at this point in the history
  • Loading branch information
acdlite authored and KamranAsif committed Nov 4, 2021
1 parent 1aa40b4 commit f354e05
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 f354e05

Please sign in to comment.