diff --git a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js index a26a5e19b2f27..e10be9e5b5514 100644 --- a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js +++ b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js @@ -6747,7 +6747,7 @@ const tests = { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching', + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching', suggestions: undefined, }, ], @@ -6771,7 +6771,7 @@ const tests = { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching', + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching', suggestions: undefined, }, ], diff --git a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js index 6958466a2ff5a..a708f78f25f74 100644 --- a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js +++ b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js @@ -111,7 +111,7 @@ export default { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching', + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching', }); } diff --git a/packages/react-client/src/__tests__/ReactFlight-test.js b/packages/react-client/src/__tests__/ReactFlight-test.js index c96f6cef6fd30..681b88f83db02 100644 --- a/packages/react-client/src/__tests__/ReactFlight-test.js +++ b/packages/react-client/src/__tests__/ReactFlight-test.js @@ -994,7 +994,7 @@ describe('ReactFlight', () => { }).toErrorDev( 'Each child in a list should have a unique "key" prop.\n' + '\n' + - 'Check the render method of `Component`. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Check the render method of `Component`. See https://react.dev/link/warning-keys for more information.\n' + ' in span (at **)\n' + ' in Component (at **)\n' + ' in Indirection (at **)\n' + @@ -1251,7 +1251,7 @@ describe('ReactFlight', () => { ReactNoopFlightClient.read(transport); }).toErrorDev( 'Each child in a list should have a unique "key" prop. ' + - 'See https://reactjs.org/link/warning-keys for more information.', + 'See https://react.dev/link/warning-keys for more information.', ); }); diff --git a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js index 1c6eea2606faf..af17f523a5e41 100644 --- a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js +++ b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js @@ -1883,7 +1883,7 @@ describe('ReactHooksInspectionIntegration', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); didCatch = true; } diff --git a/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js b/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js index a863c6144abcc..95c80859df75a 100644 --- a/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js +++ b/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js @@ -2558,7 +2558,7 @@ describe('InspectedElement', () => { { "errors": [ [ - "Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information. + "Warning: Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information. at Example", 1, ], diff --git a/packages/react-devtools-shared/src/hook.js b/packages/react-devtools-shared/src/hook.js index 92389abf6e6c7..3ab3f1b6826bc 100644 --- a/packages/react-devtools-shared/src/hook.js +++ b/packages/react-devtools-shared/src/hook.js @@ -168,7 +168,7 @@ export function installHook(target: any): DevToolsHook | null { 'React is running in production mode, but dead code ' + 'elimination has not been applied. Read how to correctly ' + 'configure React for production: ' + - 'https://reactjs.org/link/perf-use-production-build', + 'https://react.dev/link/perf-use-production-build', ); }); } diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponent.js b/packages/react-dom-bindings/src/client/ReactDOMComponent.js index 24462c1d2bb5a..a5f8b8bd40e7d 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMComponent.js +++ b/packages/react-dom-bindings/src/client/ReactDOMComponent.js @@ -610,7 +610,7 @@ function setProp( if (typeof value !== 'object' || !('__html' in value)) { throw new Error( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.', ); } @@ -938,7 +938,7 @@ function setPropOnCustomElement( if (typeof value !== 'object' || !('__html' in value)) { throw new Error( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.', ); } @@ -1502,7 +1502,7 @@ export function updateProperties( 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components', + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components', ); didWarnUncontrolledToControlled = true; } @@ -1516,7 +1516,7 @@ export function updateProperties( 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components', + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components', ); didWarnControlledToUncontrolled = true; } diff --git a/packages/react-dom-bindings/src/client/ReactDOMInput.js b/packages/react-dom-bindings/src/client/ReactDOMInput.js index 4b5f6e44da600..33c04e48d0d4a 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMInput.js +++ b/packages/react-dom-bindings/src/client/ReactDOMInput.js @@ -56,7 +56,7 @@ export function validateInputProps(element: Element, props: Object) { '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type, ); @@ -73,7 +73,7 @@ export function validateInputProps(element: Element, props: Object) { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type, ); diff --git a/packages/react-dom-bindings/src/client/ReactDOMSelect.js b/packages/react-dom-bindings/src/client/ReactDOMSelect.js index fa36a437cf108..984abbc07c769 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMSelect.js +++ b/packages/react-dom-bindings/src/client/ReactDOMSelect.js @@ -135,7 +135,7 @@ export function validateSelectProps(element: Element, props: Object) { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); didWarnValueDefaultValue = true; } diff --git a/packages/react-dom-bindings/src/client/ReactDOMTextarea.js b/packages/react-dom-bindings/src/client/ReactDOMTextarea.js index d4434b26994fd..b0a1f520fdb2a 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMTextarea.js +++ b/packages/react-dom-bindings/src/client/ReactDOMTextarea.js @@ -44,7 +44,7 @@ export function validateTextareaProps(element: Element, props: Object) { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', ); didWarnValDefaultVal = true; diff --git a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js index a469b5587d79a..b3b99db80dec7 100644 --- a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js +++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js @@ -1454,7 +1454,7 @@ function pushInnerHTML( if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { throw new Error( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.', ); } @@ -1573,7 +1573,7 @@ function pushStartSelect( '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); didWarnDefaultSelectValue = true; } @@ -2019,7 +2019,7 @@ function pushInput( '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', 'A component', props.type, ); @@ -2032,7 +2032,7 @@ function pushInput( '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', 'A component', props.type, ); @@ -2167,7 +2167,7 @@ function pushStartTextArea( '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); didWarnDefaultTextareaValue = true; } @@ -3500,7 +3500,7 @@ function pushStartPreformattedElement( if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { throw new Error( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.', ); } diff --git a/packages/react-dom-bindings/src/shared/ReactDOMFormActions.js b/packages/react-dom-bindings/src/shared/ReactDOMFormActions.js index b2ac098bcee70..492f2065edd77 100644 --- a/packages/react-dom-bindings/src/shared/ReactDOMFormActions.js +++ b/packages/react-dom-bindings/src/shared/ReactDOMFormActions.js @@ -56,7 +56,7 @@ function resolveDispatcher() { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); } } diff --git a/packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js b/packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js index 4bc62e3de4ddb..9cce3b5807aa0 100644 --- a/packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js +++ b/packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js @@ -93,14 +93,14 @@ export function validateProperties(type, props) { if (invalidProps.length === 1) { console.error( 'Invalid aria prop %s on <%s> tag. ' + - 'For details, see https://reactjs.org/link/invalid-aria-props', + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type, ); } else if (invalidProps.length > 1) { console.error( 'Invalid aria props %s on <%s> tag. ' + - 'For details, see https://reactjs.org/link/invalid-aria-props', + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type, ); diff --git a/packages/react-dom-bindings/src/shared/ReactDOMUnknownPropertyHook.js b/packages/react-dom-bindings/src/shared/ReactDOMUnknownPropertyHook.js index 3dbb1d8e2c315..0648059695ecb 100644 --- a/packages/react-dom-bindings/src/shared/ReactDOMUnknownPropertyHook.js +++ b/packages/react-dom-bindings/src/shared/ReactDOMUnknownPropertyHook.js @@ -356,7 +356,7 @@ function warnUnknownProperties(type, props, eventRegistry) { console.error( 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + - 'For details, see https://reactjs.org/link/attribute-behavior ', + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type, ); @@ -364,7 +364,7 @@ function warnUnknownProperties(type, props, eventRegistry) { console.error( 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + - 'For details, see https://reactjs.org/link/attribute-behavior ', + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type, ); diff --git a/packages/react-dom/src/__tests__/ReactComponent-test.js b/packages/react-dom/src/__tests__/ReactComponent-test.js index aae31c3494626..6a688a87a06ab 100644 --- a/packages/react-dom/src/__tests__/ReactComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactComponent-test.js @@ -166,14 +166,14 @@ describe('ReactComponent', () => { 'Warning: Component "div" contains the string ref "inner". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in div (at **)\n' + ' in Wrapper (at **)\n' + ' in Component (at **)', 'Warning: Component "Component" contains the string ref "outer". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in Component (at **)', ]); }); diff --git a/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js b/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js index 707398c6e0342..8523e2784872f 100644 --- a/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js +++ b/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js @@ -906,7 +906,7 @@ describe('ReactComponentLifeCycle', () => { ' UNSAFE_componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev( [ @@ -936,7 +936,7 @@ describe('ReactComponentLifeCycle', () => { 'WillMount uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' + ' UNSAFE_componentWillMount\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); class WillMountAndUpdate extends React.Component { @@ -963,7 +963,7 @@ describe('ReactComponentLifeCycle', () => { ' componentWillMount\n' + ' UNSAFE_componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev(['componentWillMount has been renamed'], { withoutStack: true, @@ -990,7 +990,7 @@ describe('ReactComponentLifeCycle', () => { 'WillReceiveProps uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' + ' componentWillReceiveProps\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev(['componentWillReceiveProps has been renamed'], { withoutStack: true, @@ -1023,7 +1023,7 @@ describe('ReactComponentLifeCycle', () => { ' UNSAFE_componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev( [ @@ -1052,7 +1052,7 @@ describe('ReactComponentLifeCycle', () => { 'WillMount uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' + ' UNSAFE_componentWillMount\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); class WillMountAndUpdate extends React.Component { @@ -1077,7 +1077,7 @@ describe('ReactComponentLifeCycle', () => { ' componentWillMount\n' + ' UNSAFE_componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev(['componentWillMount has been renamed'], { withoutStack: true, @@ -1104,7 +1104,7 @@ describe('ReactComponentLifeCycle', () => { 'WillReceiveProps uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' + ' componentWillReceiveProps\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev(['componentWillReceiveProps has been renamed'], { withoutStack: true, @@ -1570,20 +1570,20 @@ describe('ReactComponentLifeCycle', () => { }).toWarnDev( [ /* eslint-disable max-len */ - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: MyComponent`, - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: MyComponent`, - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. diff --git a/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js b/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js index e88bde84826b9..f6e82f25a5e8a 100644 --- a/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js @@ -143,7 +143,7 @@ describe('ReactDOM unknown attribute', () => { await expect(() => testUnknownAttributeRemoval(Symbol('foo'))).toErrorDev( 'Warning: Invalid value for prop `unknown` on
tag. Either remove it ' + 'from the element, or pass a string or number value to keep it ' + - 'in the DOM. For details, see https://reactjs.org/link/attribute-behavior \n' + + 'in the DOM. For details, see https://react.dev/link/attribute-behavior \n' + ' in div (at **)', ); }); @@ -155,7 +155,7 @@ describe('ReactDOM unknown attribute', () => { 'Warning: Invalid value for prop `unknown` on
tag. Either remove ' + 'it from the element, or pass a string or number value to ' + 'keep it in the DOM. For details, see ' + - 'https://reactjs.org/link/attribute-behavior \n' + + 'https://react.dev/link/attribute-behavior \n' + ' in div (at **)', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js index 6541293f51333..5d7854e83811e 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js @@ -192,7 +192,7 @@ describe('ReactDOMComponent', () => { }).toErrorDev( 'Warning: Invalid value for prop `foo` on
tag. Either remove it ' + 'from the element, or pass a string or number value to keep ' + - 'it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' + + 'it in the DOM. For details, see https://react.dev/link/attribute-behavior ' + '\n in div (at **)', ); }); @@ -207,7 +207,7 @@ describe('ReactDOMComponent', () => { }).toErrorDev( 'Warning: Invalid values for props `foo`, `baz` on
tag. Either remove ' + 'them from the element, or pass a string or number value to keep ' + - 'them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' + + 'them in the DOM. For details, see https://react.dev/link/attribute-behavior ' + '\n in div (at **)', ); }); @@ -1817,7 +1817,7 @@ describe('ReactDOMComponent', () => { await mountComponent({children: '', dangerouslySetInnerHTML: ''}); }).rejects.toThrowError( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.', + 'Please visit https://react.dev/link/dangerously-set-inner-html for more information.', ); }); @@ -1838,7 +1838,7 @@ describe('ReactDOMComponent', () => { await mountComponent({dangerouslySetInnerHTML: 'Hi Jim!'}); }).rejects.toThrowError( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.', + 'Please visit https://react.dev/link/dangerously-set-inner-html for more information.', ); }); @@ -1847,7 +1847,7 @@ describe('ReactDOMComponent', () => { await mountComponent({dangerouslySetInnerHTML: {foo: 'bar'}}); }).rejects.toThrowError( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.', + 'Please visit https://react.dev/link/dangerously-set-inner-html for more information.', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js b/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js index ffaae4f699a60..35e8545072027 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js @@ -201,7 +201,7 @@ describe('ReactDOMComponentTree', () => { 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); }); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js b/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js index ac7ddfd2f5576..0d49e7bae122a 100644 --- a/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js @@ -1830,7 +1830,7 @@ describe('ReactDOMFizzServer', () => { if (__DEV__) { expect(mockError).toHaveBeenCalledWith( 'Warning: Each child in a list should have a unique "key" prop.%s%s' + - ' See https://reactjs.org/link/warning-keys for more information.%s', + ' See https://react.dev/link/warning-keys for more information.%s', '\n\nCheck the top-level render call using
.', '', '\n' + diff --git a/packages/react-dom/src/__tests__/ReactDOMFloat-test.js b/packages/react-dom/src/__tests__/ReactDOMFloat-test.js index 31c1607cc149c..5377a3961d713 100644 --- a/packages/react-dom/src/__tests__/ReactDOMFloat-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMFloat-test.js @@ -2194,7 +2194,7 @@ body { ' parent component, remove it from the DOM element.', 'Invalid values for props `shouldnotincludefunctions`, `norsymbols` on tag. Either remove them from' + ' the element, or pass a string or number value to keep them in the DOM. For' + - ' details, see https://reactjs.org/link/attribute-behavior', + ' details, see https://react.dev/link/attribute-behavior', ]); // Now we flush the stylesheet with the boundary diff --git a/packages/react-dom/src/__tests__/ReactDOMInput-test.js b/packages/react-dom/src/__tests__/ReactDOMInput-test.js index ad7342f53398d..367e4a5763c3e 100644 --- a/packages/react-dom/src/__tests__/ReactDOMInput-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMInput-test.js @@ -1996,7 +1996,7 @@ describe('ReactDOMInput', () => { '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); root.unmount(); @@ -2026,7 +2026,7 @@ describe('ReactDOMInput', () => { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); await (() => { root.unmount(); @@ -2055,7 +2055,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2078,7 +2078,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ]); }); @@ -2099,7 +2099,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2118,7 +2118,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2142,7 +2142,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2163,7 +2163,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2184,7 +2184,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2205,7 +2205,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2224,7 +2224,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2243,7 +2243,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2262,7 +2262,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2281,7 +2281,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2300,7 +2300,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2319,7 +2319,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2338,7 +2338,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); @@ -2402,7 +2402,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' + + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' + ' in input (at **)', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js b/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js index 1768ec14ea9e0..8f8939cc8660a 100644 --- a/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js @@ -37,7 +37,7 @@ describe('ReactDOMInvalidARIAHook', () => { it('should warn for one invalid aria-* prop', async () => { await expect(() => mountComponent({'aria-badprop': 'maybe'})).toErrorDev( 'Warning: Invalid aria prop `aria-badprop` on
tag. ' + - 'For details, see https://reactjs.org/link/invalid-aria-props', + 'For details, see https://react.dev/link/invalid-aria-props', ); }); it('should warn for many invalid aria-* props', async () => { @@ -48,7 +48,7 @@ describe('ReactDOMInvalidARIAHook', () => { }), ).toErrorDev( 'Warning: Invalid aria props `aria-badprop`, `aria-malprop` on
' + - 'tag. For details, see https://reactjs.org/link/invalid-aria-props', + 'tag. For details, see https://react.dev/link/invalid-aria-props', ); }); it('should warn for an improperly cased aria-* prop', async () => { diff --git a/packages/react-dom/src/__tests__/ReactDOMSelect-test.js b/packages/react-dom/src/__tests__/ReactDOMSelect-test.js index 35aaba29a6a46..a16da8c136326 100644 --- a/packages/react-dom/src/__tests__/ReactDOMSelect-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMSelect-test.js @@ -875,7 +875,7 @@ describe('ReactDOMSelect', () => { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); await act(() => { diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js index 22bd1df999c9d..9bd7d2ec3f027 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js @@ -150,7 +150,7 @@ describe('ReactDOMServerHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); itRenders('multiple times when an updater is called', async render => { @@ -672,7 +672,7 @@ describe('ReactDOMServerHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationRefs-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationRefs-test.js index 1bef0f6447881..72c7b5cd679e9 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationRefs-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationRefs-test.js @@ -98,7 +98,7 @@ describe('ReactDOMServerIntegration', () => { 'Warning: Component "RefsComponent" contains the string ref "myDiv". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in RefsComponent (at **)', ]); expect(component.refs.myDiv).toBe(root.firstChild); diff --git a/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js b/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js index 4cb673847ca6d..3d3204c9f8cc8 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js @@ -295,7 +295,7 @@ describe('ReactDOMServerLifecycles', () => { } expect(() => ReactDOMServer.renderToString()).toWarnDev( - 'componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\n\n' + 'Please update the following components: MyComponent', ); diff --git a/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js b/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js index 88c574b4cb2e5..134e019c6b653 100644 --- a/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js @@ -742,7 +742,7 @@ describe('ReactDOMTextarea', () => { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + - 'https://reactjs.org/link/controlled-components', + 'https://react.dev/link/controlled-components', ); container = document.createElement('div'); diff --git a/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.js b/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.js index 4c6a0bed84a6c..4619a9ea88d53 100644 --- a/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.js +++ b/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.js @@ -82,7 +82,7 @@ describe('ReactDeprecationWarnings', () => { 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref' + + 'https://react.dev/link/strict-mode-string-ref' + '\n in Component (at **)', ); }); @@ -131,11 +131,11 @@ describe('ReactDeprecationWarnings', () => { 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref', + 'https://react.dev/link/strict-mode-string-ref', 'Warning: Component "Component" contains the string ref "refComponent". ' + 'Support for string refs will be removed in a future major release. We recommend ' + 'using useRef() or createRef() instead. Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref', + 'https://react.dev/link/strict-mode-string-ref', ]); }); @@ -166,11 +166,11 @@ describe('ReactDeprecationWarnings', () => { 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref', + 'https://react.dev/link/strict-mode-string-ref', 'Warning: Component "Component" contains the string ref "refComponent". ' + 'Support for string refs will be removed in a future major release. We recommend ' + 'using useRef() or createRef() instead. Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref', + 'https://react.dev/link/strict-mode-string-ref', ]); }); } diff --git a/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js b/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js index 7729bfd791c0b..c2456f59fbed6 100644 --- a/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js @@ -194,7 +194,7 @@ describe('ReactFunctionComponent', () => { '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://reactjs.org/link/refs-must-have-owner for more information.', + 'See https://react.dev/link/refs-must-have-owner for more information.', ); }); diff --git a/packages/react-dom/src/__tests__/ReactTestUtils-test.js b/packages/react-dom/src/__tests__/ReactTestUtils-test.js index 0d2c8574d8df9..6d46257c0b461 100644 --- a/packages/react-dom/src/__tests__/ReactTestUtils-test.js +++ b/packages/react-dom/src/__tests__/ReactTestUtils-test.js @@ -44,7 +44,7 @@ describe('ReactTestUtils', () => { expect(() => ReactTestUtils.mockComponent(MockedComponent)).toWarnDev( 'ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + - 'See https://reactjs.org/link/test-utils-mock-component for more information.', + 'See https://react.dev/link/test-utils-mock-component for more information.', {withoutStack: true}, ); diff --git a/packages/react-dom/src/__tests__/findDOMNode-test.js b/packages/react-dom/src/__tests__/findDOMNode-test.js index 59f819462421c..55eb77645c4dc 100644 --- a/packages/react-dom/src/__tests__/findDOMNode-test.js +++ b/packages/react-dom/src/__tests__/findDOMNode-test.js @@ -122,7 +122,7 @@ describe('findDOMNode', () => { 'findDOMNode was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in div (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -151,7 +151,7 @@ describe('findDOMNode', () => { 'findDOMNode was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in div (at **)' + '\n in IsInStrictMode (at **)', ]); diff --git a/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js b/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js index 96647eed81cf4..5c6d9c476d2e2 100644 --- a/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js +++ b/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js @@ -35,7 +35,7 @@ describe('when different React version is used with string ref', () => { '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://reactjs.org/link/refs-must-have-owner for more information.', + 'See https://react.dev/link/refs-must-have-owner for more information.', ); }); }); diff --git a/packages/react-dom/src/__tests__/refs-test.js b/packages/react-dom/src/__tests__/refs-test.js index fbc2133237e43..e45588813ac9d 100644 --- a/packages/react-dom/src/__tests__/refs-test.js +++ b/packages/react-dom/src/__tests__/refs-test.js @@ -134,13 +134,13 @@ describe('reactiverefs', () => { 'Warning: Component "div" contains the string ref "resetDiv". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in div (at **)\n' + ' in TestRefsComponent (at **)', 'Warning: Component "span" contains the string ref "clickLog0". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in span (at **)\n' + ' in ClickCounter (at **)\n' + ' in div (at **)\n' + @@ -384,7 +384,7 @@ describe('ref swapping', () => { 'Warning: Component "A" contains the string ref "1". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in A (at **)', ]); expect(a.refs[1].nodeName).toBe('DIV'); @@ -561,7 +561,7 @@ describe('creating element with string ref in constructor', () => { '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://reactjs.org/link/refs-must-have-owner for more information.', + 'See https://react.dev/link/refs-must-have-owner for more information.', ); }); }); @@ -618,7 +618,7 @@ describe('strings refs across renderers', () => { 'Warning: Component "Indirection" contains the string ref "child1". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in Indirection (at **)\n' + ' in Parent (at **)', ]); @@ -637,7 +637,7 @@ describe('strings refs across renderers', () => { 'Warning: Component "Root" contains the string ref "child2". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref', ], {withoutStack: true}, ); diff --git a/packages/react-dom/src/client/ReactDOM.js b/packages/react-dom/src/client/ReactDOM.js index f2e4c626070f4..78fffeb41cb34 100644 --- a/packages/react-dom/src/client/ReactDOM.js +++ b/packages/react-dom/src/client/ReactDOM.js @@ -82,7 +82,7 @@ if (__DEV__) { ) { console.error( 'React depends on Map and Set built-in types. Make sure that you load a ' + - 'polyfill in older browsers. https://reactjs.org/link/react-polyfills', + 'polyfill in older browsers. https://react.dev/link/react-polyfills', ); } } @@ -220,10 +220,10 @@ if (__DEV__) { console.info( '%cDownload the React DevTools ' + 'for a better development experience: ' + - 'https://reactjs.org/link/react-devtools' + + 'https://react.dev/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + - 'https://reactjs.org/link/react-devtools-faq' + 'https://react.dev/link/react-devtools-faq' : ''), 'font-weight:bold', ); diff --git a/packages/react-dom/src/client/ReactDOMLegacy.js b/packages/react-dom/src/client/ReactDOMLegacy.js index 9a7934dc21576..f84d713869db9 100644 --- a/packages/react-dom/src/client/ReactDOMLegacy.js +++ b/packages/react-dom/src/client/ReactDOMLegacy.js @@ -269,7 +269,7 @@ export function hydrate( 'ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + - 'more: https://reactjs.org/link/switch-to-createroot', + 'more: https://react.dev/link/switch-to-createroot', ); } @@ -309,7 +309,7 @@ export function render( 'ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + - 'more: https://reactjs.org/link/switch-to-createroot', + 'more: https://react.dev/link/switch-to-createroot', ); } @@ -349,7 +349,7 @@ export function unstable_renderSubtreeIntoContainer( 'ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + "the createRoot API, your app will behave as if it's running React " + - '17. Learn more: https://reactjs.org/link/switch-to-createroot', + '17. Learn more: https://react.dev/link/switch-to-createroot', ); } diff --git a/packages/react-dom/src/test-utils/ReactTestUtils.js b/packages/react-dom/src/test-utils/ReactTestUtils.js index 39a187ad42b58..c2af208a0a6a0 100644 --- a/packages/react-dom/src/test-utils/ReactTestUtils.js +++ b/packages/react-dom/src/test-utils/ReactTestUtils.js @@ -330,7 +330,7 @@ function mockComponent(module, mockTagName) { console.warn( 'ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + - 'See https://reactjs.org/link/test-utils-mock-component for more information.', + 'See https://react.dev/link/test-utils-mock-component for more information.', ); } } diff --git a/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js b/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js index a187595ad8a73..d7bc4d60b76e8 100644 --- a/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js +++ b/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js @@ -902,7 +902,7 @@ describe('ReactFabric', () => { 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -941,7 +941,7 @@ describe('ReactFabric', () => { 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); @@ -980,7 +980,7 @@ describe('ReactFabric', () => { 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -1019,7 +1019,7 @@ describe('ReactFabric', () => { 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); diff --git a/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js b/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js index bd6206d2daac0..11b3f66e99620 100644 --- a/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js +++ b/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js @@ -549,7 +549,7 @@ describe('ReactNative', () => { 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -586,7 +586,7 @@ describe('ReactNative', () => { 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); @@ -620,7 +620,7 @@ describe('ReactNative', () => { 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -655,7 +655,7 @@ describe('ReactNative', () => { 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node' + + 'https://react.dev/link/strict-mode-find-node' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); diff --git a/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js b/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js index 77005a9decd99..723daa0dc9e54 100644 --- a/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js +++ b/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js @@ -282,7 +282,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) { "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + - 'See https://reactjs.org/link/event-pooling for more information.', + 'See https://react.dev/link/event-pooling for more information.', action, propName, result, diff --git a/packages/react-reconciler/src/ReactChildFiber.js b/packages/react-reconciler/src/ReactChildFiber.js index 41cdf9a02f2ff..508a0bd166de7 100644 --- a/packages/react-reconciler/src/ReactChildFiber.js +++ b/packages/react-reconciler/src/ReactChildFiber.js @@ -132,7 +132,7 @@ if (__DEV__) { console.error( 'Each child in a list should have a unique ' + - '"key" prop. See https://reactjs.org/link/warning-keys for ' + + '"key" prop. See https://react.dev/link/warning-keys for ' + 'more information.', ); }; @@ -172,7 +172,7 @@ function convertStringRefToCallbackRef( '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://reactjs.org/link/refs-must-have-owner for more information.', + 'See https://react.dev/link/refs-must-have-owner for more information.', ); } if (owner.tag !== ClassComponent) { @@ -180,7 +180,7 @@ function convertStringRefToCallbackRef( 'Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref', + 'https://react.dev/link/strict-mode-string-ref', ); } @@ -204,7 +204,7 @@ function convertStringRefToCallbackRef( 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref', + 'https://react.dev/link/strict-mode-string-ref', componentName, stringRef, ); diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.js b/packages/react-reconciler/src/ReactFiberClassComponent.js index d43b7d4232745..f6a095de44146 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.js @@ -730,7 +730,7 @@ function constructClassInstance( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', componentName, newApiName, foundWillMountName !== null ? `\n ${foundWillMountName}` : '', diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.js b/packages/react-reconciler/src/ReactFiberCommitWork.js index 8b44a80e00eaa..46e75830f34dd 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.js @@ -702,7 +702,7 @@ function commitHookEffectListMount(flags: HookFlags, finishedWork: Fiber) { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching'; + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching'; } else { addendum = ' You returned: ' + destroy; } diff --git a/packages/react-reconciler/src/ReactFiberDevToolsHook.js b/packages/react-reconciler/src/ReactFiberDevToolsHook.js index f10806af18803..abf56e90fabc2 100644 --- a/packages/react-reconciler/src/ReactFiberDevToolsHook.js +++ b/packages/react-reconciler/src/ReactFiberDevToolsHook.js @@ -68,7 +68,7 @@ export function injectInternals(internals: Object): boolean { console.error( 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + - 'https://reactjs.org/link/react-devtools', + 'https://react.dev/link/react-devtools', ); } // DevTools exists, even though it doesn't support Fiber. diff --git a/packages/react-reconciler/src/ReactFiberErrorLogger.js b/packages/react-reconciler/src/ReactFiberErrorLogger.js index 1de2d3f7c4227..15a91f236de40 100644 --- a/packages/react-reconciler/src/ReactFiberErrorLogger.js +++ b/packages/react-reconciler/src/ReactFiberErrorLogger.js @@ -61,7 +61,7 @@ export function logCapturedError( if (boundary.tag === HostRoot) { errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + - 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.'; + 'Visit https://react.dev/link/error-boundaries to learn more about error boundaries.'; } else { const errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous'; diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js index 345e85d3c427b..8a7f868b64504 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.js +++ b/packages/react-reconciler/src/ReactFiberHooks.js @@ -374,7 +374,7 @@ function warnOnHookMismatchInDev(currentHookName: HookType): void { console.error( 'React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + - 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + @@ -420,7 +420,7 @@ function throwInvalidHookError() { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); } @@ -3604,7 +3604,7 @@ if (__DEV__) { 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + - 'https://reactjs.org/link/rules-of-hooks', + 'https://react.dev/link/rules-of-hooks', ); }; diff --git a/packages/react-reconciler/src/ReactFiberReconciler.js b/packages/react-reconciler/src/ReactFiberReconciler.js index c08782bfe7672..8bee380ce0370 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.js @@ -209,7 +209,7 @@ function findHostInstanceWithWarning( '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node', + 'https://react.dev/link/strict-mode-find-node', methodName, methodName, componentName, @@ -220,7 +220,7 @@ function findHostInstanceWithWarning( '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-find-node', + 'https://react.dev/link/strict-mode-find-node', methodName, methodName, componentName, diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index d045fa08496e1..98e164e0b221f 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -4023,7 +4023,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { console.error( 'Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + - 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', + 'follow the stack trace as described in https://react.dev/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName, @@ -4129,7 +4129,7 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber: Fiber): void { '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + - ' Learn more at https://reactjs.org/link/wrap-tests-with-act', + ' Learn more at https://react.dev/link/wrap-tests-with-act', getComponentNameFromFiber(fiber), ); } finally { @@ -4161,7 +4161,7 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root: FiberRoot): void { '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + - ' Learn more at https://reactjs.org/link/wrap-tests-with-act', + ' Learn more at https://react.dev/link/wrap-tests-with-act', ); } } diff --git a/packages/react-reconciler/src/ReactStrictModeWarnings.js b/packages/react-reconciler/src/ReactStrictModeWarnings.js index abaafddba382f..2f223a0f0b832 100644 --- a/packages/react-reconciler/src/ReactStrictModeWarnings.js +++ b/packages/react-reconciler/src/ReactStrictModeWarnings.js @@ -193,7 +193,7 @@ if (__DEV__) { ); console.error( 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames, @@ -207,11 +207,11 @@ if (__DEV__) { console.error( 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + - 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + + 'static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n' + '\nPlease update the following components: %s', sortedNames, ); @@ -224,7 +224,7 @@ if (__DEV__) { console.error( 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', sortedNames, @@ -236,7 +236,7 @@ if (__DEV__) { console.warn( 'componentWillMount has been renamed, and is not recommended for use. ' + - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + @@ -254,11 +254,11 @@ if (__DEV__) { console.warn( 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + - 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + + 'static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + @@ -273,7 +273,7 @@ if (__DEV__) { console.warn( 'componentWillUpdate has been renamed, and is not recommended for use. ' + - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + @@ -346,7 +346,7 @@ if (__DEV__) { '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + - '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', + '\n\nLearn more about this warning here: https://react.dev/link/legacy-context', sortedNames, ); } finally { diff --git a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js index 5da503c8ca34d..a23b904d42c7c 100644 --- a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js @@ -57,7 +57,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); }); } @@ -838,7 +838,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); // the next round, it does a fresh mount, so should render expect(() => root.update()).not.toThrow( @@ -847,7 +847,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); // and then again, fail expect(() => root.update()).toThrow( @@ -856,7 +856,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); }); @@ -1046,7 +1046,7 @@ describe('ReactHooks', () => { 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks', 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useReducer useReducer\n' + @@ -1504,7 +1504,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameB)}\n` + @@ -1554,7 +1554,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameA)}\n` + @@ -1633,7 +1633,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + `1. ${formatHookNamesToMatchErrorMessage( @@ -1675,7 +1675,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useReducer useState\n' + diff --git a/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js b/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js index 89d150ed09888..df720e207a777 100644 --- a/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js +++ b/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js @@ -215,7 +215,7 @@ describe('ReactHooksWithNoopRenderer', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); // Confirm that a subsequent hook works properly. @@ -246,7 +246,7 @@ describe('ReactHooksWithNoopRenderer', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ), ).toErrorDev( 'Warning: The component appears to be a function component that returns a class instance. ' + @@ -276,7 +276,7 @@ describe('ReactHooksWithNoopRenderer', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', {withoutStack: true}, ); }); @@ -3712,7 +3712,7 @@ describe('ReactHooksWithNoopRenderer', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useState useState\n' + @@ -3809,7 +3809,7 @@ describe('ReactHooksWithNoopRenderer', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useEffect useEffect\n' + diff --git a/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js b/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js index 1e34dd9cde5d2..d5b7fd8f174de 100644 --- a/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js +++ b/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js @@ -1372,7 +1372,7 @@ describe('ReactIncrementalSideEffects', () => { 'Warning: Component "Foo" contains the string ref "bar". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in Foo (at **)', ]); expect(fooInstance.refs.bar.test).toEqual('test'); diff --git a/packages/react-reconciler/src/__tests__/ReactMemo-test.js b/packages/react-reconciler/src/__tests__/ReactMemo-test.js index 0212f50bab318..a70d5aa53dd51 100644 --- a/packages/react-reconciler/src/__tests__/ReactMemo-test.js +++ b/packages/react-reconciler/src/__tests__/ReactMemo-test.js @@ -598,7 +598,7 @@ describe('memo', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in p (at **)', ); }); @@ -615,7 +615,7 @@ describe('memo', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Inner (at **)\n' + ' in p (at **)', ); @@ -635,7 +635,7 @@ describe('memo', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Inner (at **)\n' + ' in p (at **)', ); @@ -654,7 +654,7 @@ describe('memo', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Outer (at **)\n' + ' in p (at **)', ); @@ -675,7 +675,7 @@ describe('memo', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Inner (at **)\n' + ' in p (at **)', ); diff --git a/packages/react-reconciler/src/__tests__/ReactNewContext-test.js b/packages/react-reconciler/src/__tests__/ReactNewContext-test.js index e51ca08f2b8e8..492e7b232432c 100644 --- a/packages/react-reconciler/src/__tests__/ReactNewContext-test.js +++ b/packages/react-reconciler/src/__tests__/ReactNewContext-test.js @@ -1337,7 +1337,7 @@ describe('ReactNewContext', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); }); diff --git a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js index ce5ad36a9dea2..f5070711534ae 100644 --- a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js +++ b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js @@ -609,7 +609,7 @@ describe('ReactFlightDOMBrowser', () => { await ReactServerDOMClient.createFromReadableStream(stream); }).toErrorDev( 'Each child in a list should have a unique "key" prop. ' + - 'See https://reactjs.org/link/warning-keys for more information.', + 'See https://react.dev/link/warning-keys for more information.', ); }); diff --git a/packages/react-server/src/ReactFizzClassComponent.js b/packages/react-server/src/ReactFizzClassComponent.js index e516aa46eca7c..27eef61884ad2 100644 --- a/packages/react-server/src/ReactFizzClassComponent.js +++ b/packages/react-server/src/ReactFizzClassComponent.js @@ -292,7 +292,7 @@ export function constructClassInstance( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', componentName, newApiName, foundWillMountName !== null ? `\n ${foundWillMountName}` : '', @@ -539,7 +539,7 @@ function callComponentWillMount(type: any, instance: any) { console.warn( // keep this warning in sync with ReactStrictModeWarning.js 'componentWillMount has been renamed, and is not recommended for use. ' + - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', diff --git a/packages/react-server/src/ReactFizzHooks.js b/packages/react-server/src/ReactFizzHooks.js index 6d87b97e9fc6a..36da5e6539b2a 100644 --- a/packages/react-server/src/ReactFizzHooks.js +++ b/packages/react-server/src/ReactFizzHooks.js @@ -106,7 +106,7 @@ function resolveCurrentlyRenderingComponent(): Object { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); } @@ -116,7 +116,7 @@ function resolveCurrentlyRenderingComponent(): Object { 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + - 'https://reactjs.org/link/rules-of-hooks', + 'https://react.dev/link/rules-of-hooks', ); } } diff --git a/packages/react/src/ReactHooks.js b/packages/react/src/ReactHooks.js index 3d67608c87d75..60fc20062d597 100644 --- a/packages/react/src/ReactHooks.js +++ b/packages/react/src/ReactHooks.js @@ -31,7 +31,7 @@ function resolveDispatcher() { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); } } diff --git a/packages/react/src/__tests__/ReactChildren-test.js b/packages/react/src/__tests__/ReactChildren-test.js index 532cc3e8ec232..062794d31691c 100644 --- a/packages/react/src/__tests__/ReactChildren-test.js +++ b/packages/react/src/__tests__/ReactChildren-test.js @@ -1031,7 +1031,7 @@ describe('ReactChildren', () => { }).toErrorDev( 'Warning: ' + 'Each child in a list should have a unique "key" prop.' + - ' See https://reactjs.org/link/warning-keys for more information.' + + ' See https://react.dev/link/warning-keys for more information.' + '\n in ComponentReturningArray (at **)', ); }); @@ -1060,7 +1060,7 @@ describe('ReactChildren', () => { }).toErrorDev( 'Warning: ' + 'Each child in a list should have a unique "key" prop.' + - ' See https://reactjs.org/link/warning-keys for more information.', + ' See https://react.dev/link/warning-keys for more information.', {withoutStack: true}, // There's nothing on the stack ); }); diff --git a/packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee b/packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee index 3924d579ad82c..cba7f2d339d66 100644 --- a/packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee +++ b/packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee @@ -550,7 +550,7 @@ describe 'ReactCoffeeScriptClass', -> 'Warning: Component "Foo" contains the string ref "inner". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in Foo (at **)' ]); expect(ref.current.refs.inner.getName()).toBe 'foo' diff --git a/packages/react/src/__tests__/ReactCreateElement-test.js b/packages/react/src/__tests__/ReactCreateElement-test.js index 8eb5f8c0e13f2..fbc3f6a50c96a 100644 --- a/packages/react/src/__tests__/ReactCreateElement-test.js +++ b/packages/react/src/__tests__/ReactCreateElement-test.js @@ -75,7 +75,7 @@ describe('ReactCreateElement', () => { 'Child: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', ); }); @@ -85,7 +85,7 @@ describe('ReactCreateElement', () => { 'div: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', {withoutStack: true}, ); }); @@ -116,7 +116,7 @@ describe('ReactCreateElement', () => { 'Child: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', ); }); diff --git a/packages/react/src/__tests__/ReactES6Class-test.js b/packages/react/src/__tests__/ReactES6Class-test.js index b4f76b2d7d002..2e60d3b618319 100644 --- a/packages/react/src/__tests__/ReactES6Class-test.js +++ b/packages/react/src/__tests__/ReactES6Class-test.js @@ -589,7 +589,7 @@ describe('ReactES6Class', () => { 'Warning: Component "Foo" contains the string ref "inner". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in Foo (at **)', ]); expect(ref.current.refs.inner.getName()).toBe('foo'); diff --git a/packages/react/src/__tests__/ReactElementValidator-test.internal.js b/packages/react/src/__tests__/ReactElementValidator-test.internal.js index 4ffd5db6a2a66..a5bb9954a192d 100644 --- a/packages/react/src/__tests__/ReactElementValidator-test.internal.js +++ b/packages/react/src/__tests__/ReactElementValidator-test.internal.js @@ -89,7 +89,7 @@ describe('ReactElementValidator', () => { await act(() => root.render({divs})); }).toErrorDev( 'Warning: Each child in a list should have a unique ' + - '"key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + '"key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in div (at **)', ); }); @@ -104,7 +104,7 @@ describe('ReactElementValidator', () => { }).toErrorDev( 'Warning: Each child in a list should have a unique ' + '"key" prop.\n\nCheck the top-level render call using
. See ' + - 'https://reactjs.org/link/warning-keys for more information.\n' + + 'https://react.dev/link/warning-keys for more information.\n' + ' in div (at **)', ); }); @@ -128,7 +128,7 @@ describe('ReactElementValidator', () => { }).toErrorDev( 'Warning: Each child in a list should have a unique ' + '"key" prop.\n\nCheck the render method of `Component`. See ' + - 'https://reactjs.org/link/warning-keys for more information.\n' + + 'https://react.dev/link/warning-keys for more information.\n' + ' in div (at **)\n' + ' in Component (at **)\n' + ' in Parent (at **)\n' + @@ -231,7 +231,7 @@ describe('ReactElementValidator', () => { await act(() => root.render(React.createElement(ParentComp))); }).toErrorDev( 'Each child in a list should have a unique "key" prop. ' + - 'See https://reactjs.org/link/warning-keys for more information.\n' + + 'See https://react.dev/link/warning-keys for more information.\n' + ' in MyComp (at **)\n' + ' in ParentComp (at **)', ); diff --git a/packages/react/src/__tests__/ReactJSXElementValidator-test.js b/packages/react/src/__tests__/ReactJSXElementValidator-test.js index b34de9e67a4cb..c5ebbc98aef69 100644 --- a/packages/react/src/__tests__/ReactJSXElementValidator-test.js +++ b/packages/react/src/__tests__/ReactJSXElementValidator-test.js @@ -154,7 +154,7 @@ describe('ReactJSXElementValidator', () => { } expect(() => ReactTestUtils.renderIntoDocument()).toErrorDev( 'Each child in a list should have a unique "key" prop. ' + - 'See https://reactjs.org/link/warning-keys for more information.\n' + + 'See https://react.dev/link/warning-keys for more information.\n' + ' in MyComp (at **)\n' + ' in ParentComp (at **)', ); diff --git a/packages/react/src/__tests__/ReactJSXRuntime-test.js b/packages/react/src/__tests__/ReactJSXRuntime-test.js index bb77f22ae03bf..9774ad392b3e0 100644 --- a/packages/react/src/__tests__/ReactJSXRuntime-test.js +++ b/packages/react/src/__tests__/ReactJSXRuntime-test.js @@ -190,7 +190,7 @@ describe('ReactJSXRuntime', () => { 'Child: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', ); }); @@ -215,7 +215,7 @@ describe('ReactJSXRuntime', () => { 'div: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', {withoutStack: true}, ); }); @@ -244,7 +244,7 @@ describe('ReactJSXRuntime', () => { 'Child: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', ); }); @@ -274,7 +274,7 @@ describe('ReactJSXRuntime', () => { }); }).toErrorDev( 'Warning: Each child in a list should have a unique "key" prop.\n\n' + - 'Check the render method of `Parent`. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Check the render method of `Parent`. See https://react.dev/link/warning-keys for more information.\n' + ' in Child (at **)\n' + ' in Parent (at **)', ); diff --git a/packages/react/src/__tests__/ReactStrictMode-test.js b/packages/react/src/__tests__/ReactStrictMode-test.js index 28dd94ad06ca2..52141ca35b56a 100644 --- a/packages/react/src/__tests__/ReactStrictMode-test.js +++ b/packages/react/src/__tests__/ReactStrictMode-test.js @@ -624,18 +624,18 @@ describe('Concurrent Mode', () => { ).toErrorDev( [ /* eslint-disable max-len */ - `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. Please update the following components: App`, - `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state Please update the following components: Bar, Foo`, - `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. @@ -688,18 +688,18 @@ Please update the following components: App`, ).toErrorDev( [ /* eslint-disable max-len */ - `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. Please update the following components: App`, - `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state Please update the following components: Child`, - `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. @@ -711,20 +711,20 @@ Please update the following components: App`, }).toWarnDev( [ /* eslint-disable max-len */ - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: Parent`, - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: Parent`, - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. @@ -997,7 +997,7 @@ describe('string refs', () => { 'Warning: Component "StrictMode" contains the string ref "somestring". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in OuterComponent (at **)', ); @@ -1035,7 +1035,7 @@ describe('string refs', () => { 'Warning: Component "StrictMode" contains the string ref "somestring". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in OuterComponent (at **)', ); @@ -1124,7 +1124,7 @@ describe('context legacy', () => { '\n\nPlease update the following components: ' + 'FunctionalLegacyContextConsumer, LegacyContextConsumer, LegacyContextProvider' + '\n\nLearn more about this warning here: ' + - 'https://reactjs.org/link/legacy-context' + + 'https://react.dev/link/legacy-context' + '\n in LegacyContextProvider (at **)' + '\n in div (at **)' + '\n in Root (at **)', diff --git a/packages/react/src/__tests__/ReactTypeScriptClass-test.ts b/packages/react/src/__tests__/ReactTypeScriptClass-test.ts index 9cc9c1cc24b15..4f966bb9fbb10 100644 --- a/packages/react/src/__tests__/ReactTypeScriptClass-test.ts +++ b/packages/react/src/__tests__/ReactTypeScriptClass-test.ts @@ -697,7 +697,7 @@ describe('ReactTypeScriptClass', function() { 'Warning: Component "ClassicRefs" contains the string ref "inner". ' + 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' + + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' + ' in ClassicRefs (at **)', ]); expect(ref.current.refs.inner.getName()).toBe('foo'); diff --git a/packages/react/src/__tests__/createReactClassIntegration-test.js b/packages/react/src/__tests__/createReactClassIntegration-test.js index 03bfe294ebfc3..0b65b14257814 100644 --- a/packages/react/src/__tests__/createReactClassIntegration-test.js +++ b/packages/react/src/__tests__/createReactClassIntegration-test.js @@ -608,7 +608,7 @@ describe('create-react-class-integration', () => { ' componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev( [ @@ -657,7 +657,7 @@ describe('create-react-class-integration', () => { ' componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://reactjs.org/link/unsafe-component-lifecycles', + 'https://react.dev/link/unsafe-component-lifecycles', ); }).toWarnDev( [ diff --git a/packages/react/src/__tests__/forwardRef-test.js b/packages/react/src/__tests__/forwardRef-test.js index 37a35c4e84dbc..667da7bb48236 100644 --- a/packages/react/src/__tests__/forwardRef-test.js +++ b/packages/react/src/__tests__/forwardRef-test.js @@ -192,7 +192,7 @@ describe('forwardRef', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in p (at **)', ); }); @@ -209,7 +209,7 @@ describe('forwardRef', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Inner (at **)\n' + ' in p (at **)', ); @@ -229,7 +229,7 @@ describe('forwardRef', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Inner (at **)\n' + ' in p (at **)', ); @@ -248,7 +248,7 @@ describe('forwardRef', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Outer (at **)\n' + ' in p (at **)', ); @@ -269,7 +269,7 @@ describe('forwardRef', () => { await expect(async () => { await waitForAll([]); }).toErrorDev( - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' + + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' + ' in Inner (at **)\n' + ' in p (at **)', ); diff --git a/packages/react/src/jsx/ReactJSXElement.js b/packages/react/src/jsx/ReactJSXElement.js index 7022bfb87e760..48da840aa3055 100644 --- a/packages/react/src/jsx/ReactJSXElement.js +++ b/packages/react/src/jsx/ReactJSXElement.js @@ -78,7 +78,7 @@ function warnIfStringRefCannotBeAutoConverted(config, self) { 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://reactjs.org/link/strict-mode-string-ref', + 'https://react.dev/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref, ); @@ -97,7 +97,7 @@ function defineKeyPropWarningGetter(props, displayName) { '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', displayName, ); } @@ -120,7 +120,7 @@ function defineRefPropWarningGetter(props, displayName) { '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://reactjs.org/link/special-props)', + 'prop. (https://react.dev/link/special-props)', displayName, ); } @@ -1031,7 +1031,7 @@ function validateExplicitKey(element, parentType) { setCurrentlyValidatingElement(element); console.error( 'Each child in a list should have a unique "key" prop.' + - '%s%s See https://reactjs.org/link/warning-keys for more information.', + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwner, ); diff --git a/packages/shared/invokeGuardedCallbackImpl.js b/packages/shared/invokeGuardedCallbackImpl.js index fc614df5b070f..745f32c2a8829 100644 --- a/packages/shared/invokeGuardedCallbackImpl.js +++ b/packages/shared/invokeGuardedCallbackImpl.js @@ -172,7 +172,7 @@ export default function invokeGuardedCallbackImpl, Context>( error = new Error( "A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + - 'See https://reactjs.org/link/crossorigin-error for more information.', + 'See https://react.dev/link/crossorigin-error for more information.', ); } this.onError(error); diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index 1471b340098a0..289f6e1a0a6c6 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -60,7 +60,7 @@ "58": "Cannot replace markup of the node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().", "59": "%s is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`.", "60": "Can only set one of `children` or `props.dangerouslySetInnerHTML`.", - "61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.", + "61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.", "62": "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.", "63": "Must be mounted to trap events", "64": "Requires node to be rendered.", @@ -118,8 +118,8 @@ "116": "traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.", "117": "traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s", "118": "updateTextContent called on non-empty component.", - "119": "Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://reactjs.org/link/refs-must-have-owner).", - "120": "Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://reactjs.org/link/refs-must-have-owner).", + "119": "Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://react.dev/link/refs-must-have-owner).", + "120": "Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://react.dev/link/refs-must-have-owner).", "121": "performUpdateIfNecessary: Unexpected batch number (current %s, pending %s)", "122": "%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", "123": "ReactUpdates: must inject a reconcile transaction class and batching strategy", @@ -148,7 +148,7 @@ "146": "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.", "147": "Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.", "148": "Expected ref to be a function or a string.", - "149": "Element ref was specified as a string (%s) but no owner was set. You may have multiple copies of React loaded. (details: https://reactjs.org/link/refs-must-have-owner).", + "149": "Element ref was specified as a string (%s) but no owner was set. You may have multiple copies of React loaded. (details: https://react.dev/link/refs-must-have-owner).", "150": "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.", "151": "An iterable object provided no iterator.", "152": "Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.", @@ -252,7 +252,7 @@ "251": "batch.commit: Cannot commit a batch multiple times.", "252": "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.", "253": "work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.", - "254": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.", + "254": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information.", "255": "Expected ReactFbErrorUtils.invokeGuardedCallback to be a function.", "257": "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.", "258": "Unknown element-like object type: %s. This is likely a bug in React. Please file an issue.", @@ -272,7 +272,7 @@ "273": "Nesting of within is not currently supported.", "274": "Text strings must be rendered within a component.", "275": "The current renderer does not support mutation. This error is likely caused by a bug in React. Please file an issue.", - "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills", + "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills", "277": "Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.", "278": "unstable_createRoot(...): Target container is not a DOM element.", "279": "Trying to release an event instance into a pool of a different type.", @@ -283,10 +283,10 @@ "284": "Expected ref to be a function, a string, an object returned by React.createRef(), or null.", "285": "The root failed to unmount after an error. This is likely a bug in React. Please file an issue.", "286": "%s(...): the first argument must be a React class instance. Instead received: %s.", - "287": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling", - "288": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling", + "287": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://react.dev/link/profiling", + "288": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://react.dev/link/profiling", "289": "Function components cannot have refs.", - "290": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.", + "290": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information.", "292": "The matcher `toHaveYielded` expects an instance of React Test Renderer.\n\nTry: expect(Scheduler).toHaveYielded(expectedYields)", "293": "Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.", "294": "ReactDOMServer does not yet support Suspense.", @@ -296,14 +296,14 @@ "299": "Target container is not a DOM element.", "300": "Rendered fewer hooks than expected. This may be caused by an accidental early return statement.", "301": "Too many re-renders. React limits the number of renders to prevent an infinite loop.", - "302": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling", + "302": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://react.dev/link/profiling", "303": "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.", "304": "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.", "305": "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.", "306": "Element type is invalid. Received a promise that resolves to: %s. Lazy element type must resolve to a class or function.%s", - "307": "Hooks can only be called inside the body of a function component. (https://reactjs.org/link/invalid-hook-call)", + "307": "Hooks can only be called inside the body of a function component. (https://react.dev/link/invalid-hook-call)", "308": "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().", - "309": "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", + "309": "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref", "310": "Rendered more hooks than during the previous render.", "311": "Should have a queue. This is likely a bug in React. Please file an issue.", "312": "Rendered more hooks than during the previous render", @@ -315,7 +315,7 @@ "318": "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.", "319": "A dehydrated suspense boundary must commit before trying to render. This is probably a bug in React.", "320": "Expected ReactFiberErrorDialog.showErrorDialog to be a function.", - "321": "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.", + "321": "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.", "322": "forwardRef requires a render function but was given %s.", "323": "React has blocked a javascript: URL as a security precaution.", "326": "Expected a valid priority level",