Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade useId to alpha channel #22674

Merged
merged 1 commit into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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