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 1bb505b589c23..b7179d55bda21 100644
--- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationRefs-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationRefs-test.js
@@ -99,7 +99,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 7064520dec5b3..40b84fb2dac61 100644
--- a/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.js
+++ b/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.js
@@ -83,7 +83,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 **)',
);
});
@@ -134,11 +134,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',
]);
});
@@ -170,11 +170,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 e73765257dc88..b1409c580c709 100644
--- a/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js
+++ b/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js
@@ -195,7 +195,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 1afb3d35e7cbf..0d63137b1ab74 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
@@ -36,7 +36,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 a749e63b55bea..f43ada19e004f 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' +
@@ -386,7 +386,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.',
);
});
});
@@ -619,7 +619,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 **)',
]);
@@ -638,7 +638,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 8b0c422e7a3de..1a3b35f816b41 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',
);
}
@@ -197,7 +197,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 9125035a3f8c0..e3992a6343080 100644
--- a/packages/react-reconciler/src/ReactFiberCommitWork.js
+++ b/packages/react-reconciler/src/ReactFiberCommitWork.js
@@ -703,7 +703,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 1c59419c3cb61..0056f7fd630d8 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 a034de39d6317..9f892d3f91f33 100644
--- a/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js
+++ b/packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js
@@ -1373,7 +1373,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 e072c18e59bcb..dcdd8c95628d4 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 9e187b15979fd..6aff89c732d7d 100644
--- a/packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee
+++ b/packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee
@@ -551,7 +551,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 690950f0b3364..8b7097b7a1409 100644
--- a/packages/react/src/__tests__/ReactES6Class-test.js
+++ b/packages/react/src/__tests__/ReactES6Class-test.js
@@ -590,7 +590,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 fb9dedb8b098d..4a6cd3d6700a3 100644
--- a/packages/react/src/__tests__/ReactJSXElementValidator-test.js
+++ b/packages/react/src/__tests__/ReactJSXElementValidator-test.js
@@ -195,7 +195,7 @@ describe('ReactJSXElementValidator', () => {
});
}).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 6347eb5caf653..3f1042435523a 100644
--- a/packages/react/src/__tests__/ReactJSXRuntime-test.js
+++ b/packages/react/src/__tests__/ReactJSXRuntime-test.js
@@ -216,7 +216,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)',
);
});
@@ -241,7 +241,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},
);
});
@@ -270,7 +270,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)',
);
});
@@ -300,7 +300,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 32f4682385c88..dbc7bb36ff4f9 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.
@@ -998,7 +998,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 **)',
);
@@ -1037,7 +1037,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 **)',
);
@@ -1126,7 +1126,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 b40fb99829af5..9db1627c4346c 100644
--- a/packages/react/src/__tests__/ReactTypeScriptClass-test.ts
+++ b/packages/react/src/__tests__/ReactTypeScriptClass-test.ts
@@ -698,7 +698,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 7ca9a43b159d0..bf455995aa762 100644
--- a/packages/react/src/jsx/ReactJSXElement.js
+++ b/packages/react/src/jsx/ReactJSXElement.js
@@ -79,7 +79,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,
);
@@ -98,7 +98,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,
);
}
@@ -121,7 +121,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,
);
}
@@ -1034,7 +1034,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 2a14f02dd03be..0387762d85e06 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, an object returned by React.createRef(), or undefined/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",