@samitouri / QOS-React-1 / commits / 1940cb27b2

Update /link URLs to react.dev (#28477)

Depends on https://github.com/reactjs/react.dev/pull/6670 [merged]

Ricky committed Mar 3, 2024 at 17:34 UTC 1940cb27b260c2eab79c76763d1151ba18353ff8
72 files changed +218 -218
packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js
+2 -2
@@ -6747,7 +6747,7 @@ const tests = {
6747 ' }\n' +
6748 ' fetchData();\n' +
6749 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6750 - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
6750 + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
6751 suggestions: undefined,
6752 },
6753 ],
@@ -6771,7 +6771,7 @@ const tests = {
6771 ' }\n' +
6772 ' fetchData();\n' +
6773 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6774 - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
6774 + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
6775 suggestions: undefined,
6776 },
6777 ],
packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
+1 -1
@@ -111,7 +111,7 @@ export default {
111 ' }\n' +
112 ' fetchData();\n' +
113 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
114 - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
114 + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
115 });
116 }
117
packages/react-client/src/__tests__/ReactFlight-test.js
+2 -2
@@ -994,7 +994,7 @@ describe('ReactFlight', () => {
994 }).toErrorDev(
995 'Each child in a list should have a unique "key" prop.\n' +
996 '\n' +
997 - 'Check the render method of `Component`. See https://reactjs.org/link/warning-keys for more information.\n' +
997 + 'Check the render method of `Component`. See https://react.dev/link/warning-keys for more information.\n' +
998 ' in span (at **)\n' +
999 ' in Component (at **)\n' +
1000 ' in Indirection (at **)\n' +
@@ -1251,7 +1251,7 @@ describe('ReactFlight', () => {
1251 ReactNoopFlightClient.read(transport);
1252 }).toErrorDev(
1253 'Each child in a list should have a unique "key" prop. ' +
1254 - 'See https://reactjs.org/link/warning-keys for more information.',
1254 + 'See https://react.dev/link/warning-keys for more information.',
1255 );
1256 });
1257
packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js
+1 -1
@@ -1883,7 +1883,7 @@ describe('ReactHooksInspectionIntegration', () => {
1883 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
1884 '2. You might be breaking the Rules of Hooks\n' +
1885 '3. You might have more than one copy of React in the same app\n' +
1886 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
1886 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
1887 );
1888 didCatch = true;
1889 }
packages/react-devtools-shared/src/__tests__/inspectedElement-test.js
+1 -1
@@ -2558,7 +2558,7 @@ describe('InspectedElement', () => {
2558 {
2559 "errors": [
2560 [
2561 - "Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.
2561 + "Warning: Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.
2562 at Example",
2563 1,
2564 ],
packages/react-devtools-shared/src/hook.js
+1 -1
@@ -168,7 +168,7 @@ export function installHook(target: any): DevToolsHook | null {
168 'React is running in production mode, but dead code ' +
169 'elimination has not been applied. Read how to correctly ' +
170 'configure React for production: ' +
171 - 'https://reactjs.org/link/perf-use-production-build',
171 + 'https://react.dev/link/perf-use-production-build',
172 );
173 });
174 }
packages/react-dom-bindings/src/client/ReactDOMComponent.js
+4 -4
@@ -610,7 +610,7 @@ function setProp(
610 if (typeof value !== 'object' || !('__html' in value)) {
611 throw new Error(
612 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
613 - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
613 + 'Please visit https://react.dev/link/dangerously-set-inner-html ' +
614 'for more information.',
615 );
616 }
@@ -938,7 +938,7 @@ function setPropOnCustomElement(
938 if (typeof value !== 'object' || !('__html' in value)) {
939 throw new Error(
940 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
941 - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
941 + 'Please visit https://react.dev/link/dangerously-set-inner-html ' +
942 'for more information.',
943 );
944 }
@@ -1502,7 +1502,7 @@ export function updateProperties(
1502 'This is likely caused by the value changing from undefined to ' +
1503 'a defined value, which should not happen. ' +
1504 'Decide between using a controlled or uncontrolled input ' +
1505 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components',
1505 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components',
1506 );
1507 didWarnUncontrolledToControlled = true;
1508 }
@@ -1516,7 +1516,7 @@ export function updateProperties(
1516 'This is likely caused by the value changing from a defined to ' +
1517 'undefined, which should not happen. ' +
1518 'Decide between using a controlled or uncontrolled input ' +
1519 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components',
1519 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components',
1520 );
1521 didWarnControlledToUncontrolled = true;
1522 }
packages/react-dom-bindings/src/client/ReactDOMInput.js
+2 -2
@@ -56,7 +56,7 @@ export function validateInputProps(element: Element, props: Object) {
56 '(specify either the checked prop, or the defaultChecked prop, but not ' +
57 'both). Decide between using a controlled or uncontrolled input ' +
58 'element and remove one of these props. More info: ' +
59 - 'https://reactjs.org/link/controlled-components',
59 + 'https://react.dev/link/controlled-components',
60 getCurrentFiberOwnerNameInDevOrNull() || 'A component',
61 props.type,
62 );
@@ -73,7 +73,7 @@ export function validateInputProps(element: Element, props: Object) {
73 '(specify either the value prop, or the defaultValue prop, but not ' +
74 'both). Decide between using a controlled or uncontrolled input ' +
75 'element and remove one of these props. More info: ' +
76 - 'https://reactjs.org/link/controlled-components',
76 + 'https://react.dev/link/controlled-components',
77 getCurrentFiberOwnerNameInDevOrNull() || 'A component',
78 props.type,
79 );
packages/react-dom-bindings/src/client/ReactDOMSelect.js
+1 -1
@@ -135,7 +135,7 @@ export function validateSelectProps(element: Element, props: Object) {
135 '(specify either the value prop, or the defaultValue prop, but not ' +
136 'both). Decide between using a controlled or uncontrolled select ' +
137 'element and remove one of these props. More info: ' +
138 - 'https://reactjs.org/link/controlled-components',
138 + 'https://react.dev/link/controlled-components',
139 );
140 didWarnValueDefaultValue = true;
141 }
packages/react-dom-bindings/src/client/ReactDOMTextarea.js
+1 -1
@@ -44,7 +44,7 @@ export function validateTextareaProps(element: Element, props: Object) {
44 '(specify either the value prop, or the defaultValue prop, but not ' +
45 'both). Decide between using a controlled or uncontrolled textarea ' +
46 'and remove one of these props. More info: ' +
47 - 'https://reactjs.org/link/controlled-components',
47 + 'https://react.dev/link/controlled-components',
48 getCurrentFiberOwnerNameInDevOrNull() || 'A component',
49 );
50 didWarnValDefaultVal = true;
packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
+6 -6
@@ -1454,7 +1454,7 @@ function pushInnerHTML(
1454 if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
1455 throw new Error(
1456 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1457 - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
1457 + 'Please visit https://react.dev/link/dangerously-set-inner-html ' +
1458 'for more information.',
1459 );
1460 }
@@ -1573,7 +1573,7 @@ function pushStartSelect(
1573 '(specify either the value prop, or the defaultValue prop, but not ' +
1574 'both). Decide between using a controlled or uncontrolled select ' +
1575 'element and remove one of these props. More info: ' +
1576 - 'https://reactjs.org/link/controlled-components',
1576 + 'https://react.dev/link/controlled-components',
1577 );
1578 didWarnDefaultSelectValue = true;
1579 }
@@ -2019,7 +2019,7 @@ function pushInput(
2019 '(specify either the checked prop, or the defaultChecked prop, but not ' +
2020 'both). Decide between using a controlled or uncontrolled input ' +
2021 'element and remove one of these props. More info: ' +
2022 - 'https://reactjs.org/link/controlled-components',
2022 + 'https://react.dev/link/controlled-components',
2023 'A component',
2024 props.type,
2025 );
@@ -2032,7 +2032,7 @@ function pushInput(
2032 '(specify either the value prop, or the defaultValue prop, but not ' +
2033 'both). Decide between using a controlled or uncontrolled input ' +
2034 'element and remove one of these props. More info: ' +
2035 - 'https://reactjs.org/link/controlled-components',
2035 + 'https://react.dev/link/controlled-components',
2036 'A component',
2037 props.type,
2038 );
@@ -2167,7 +2167,7 @@ function pushStartTextArea(
2167 '(specify either the value prop, or the defaultValue prop, but not ' +
2168 'both). Decide between using a controlled or uncontrolled textarea ' +
2169 'and remove one of these props. More info: ' +
2170 - 'https://reactjs.org/link/controlled-components',
2170 + 'https://react.dev/link/controlled-components',
2171 );
2172 didWarnDefaultTextareaValue = true;
2173 }
@@ -3500,7 +3500,7 @@ function pushStartPreformattedElement(
3500 if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
3501 throw new Error(
3502 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
3503 - 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
3503 + 'Please visit https://react.dev/link/dangerously-set-inner-html ' +
3504 'for more information.',
3505 );
3506 }
packages/react-dom-bindings/src/shared/ReactDOMFormActions.js
+1 -1
@@ -56,7 +56,7 @@ function resolveDispatcher() {
56 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
57 '2. You might be breaking the Rules of Hooks\n' +
58 '3. You might have more than one copy of React in the same app\n' +
59 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
59 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
60 );
61 }
62 }
packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js
+2 -2
@@ -93,14 +93,14 @@ export function validateProperties(type, props) {
93 if (invalidProps.length === 1) {
94 console.error(
95 'Invalid aria prop %s on <%s> tag. ' +
96 - 'For details, see https://reactjs.org/link/invalid-aria-props',
96 + 'For details, see https://react.dev/link/invalid-aria-props',
97 unknownPropString,
98 type,
99 );
100 } else if (invalidProps.length > 1) {
101 console.error(
102 'Invalid aria props %s on <%s> tag. ' +
103 - 'For details, see https://reactjs.org/link/invalid-aria-props',
103 + 'For details, see https://react.dev/link/invalid-aria-props',
104 unknownPropString,
105 type,
106 );
packages/react-dom-bindings/src/shared/ReactDOMUnknownPropertyHook.js
+2 -2
@@ -356,7 +356,7 @@ function warnUnknownProperties(type, props, eventRegistry) {
356 console.error(
357 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' +
358 'or pass a string or number value to keep it in the DOM. ' +
359 - 'For details, see https://reactjs.org/link/attribute-behavior ',
359 + 'For details, see https://react.dev/link/attribute-behavior ',
360 unknownPropString,
361 type,
362 );
@@ -364,7 +364,7 @@ function warnUnknownProperties(type, props, eventRegistry) {
364 console.error(
365 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' +
366 'or pass a string or number value to keep them in the DOM. ' +
367 - 'For details, see https://reactjs.org/link/attribute-behavior ',
367 + 'For details, see https://react.dev/link/attribute-behavior ',
368 unknownPropString,
369 type,
370 );
packages/react-dom/src/__tests__/ReactComponent-test.js
+2 -2
@@ -171,14 +171,14 @@ describe('ReactComponent', () => {
171 'Warning: Component "div" contains the string ref "inner". ' +
172 'Support for string refs will be removed in a future major release. ' +
173 'We recommend using useRef() or createRef() instead. ' +
174 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
174 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
175 ' in div (at **)\n' +
176 ' in Wrapper (at **)\n' +
177 ' in Component (at **)',
178 'Warning: Component "Component" contains the string ref "outer". ' +
179 'Support for string refs will be removed in a future major release. ' +
180 'We recommend using useRef() or createRef() instead. ' +
181 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
181 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
182 ' in Component (at **)',
183 ]);
184 });
packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js
+12 -12
@@ -906,7 +906,7 @@ describe('ReactComponentLifeCycle', () => {
906 ' UNSAFE_componentWillReceiveProps\n' +
907 ' componentWillUpdate\n\n' +
908 'The above lifecycles should be removed. Learn more about this warning here:\n' +
909 - 'https://reactjs.org/link/unsafe-component-lifecycles',
909 + 'https://react.dev/link/unsafe-component-lifecycles',
910 );
911 }).toWarnDev(
912 [
@@ -936,7 +936,7 @@ describe('ReactComponentLifeCycle', () => {
936 'WillMount uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
937 ' UNSAFE_componentWillMount\n\n' +
938 'The above lifecycles should be removed. Learn more about this warning here:\n' +
939 - 'https://reactjs.org/link/unsafe-component-lifecycles',
939 + 'https://react.dev/link/unsafe-component-lifecycles',
940 );
941
942 class WillMountAndUpdate extends React.Component {
@@ -963,7 +963,7 @@ describe('ReactComponentLifeCycle', () => {
963 ' componentWillMount\n' +
964 ' UNSAFE_componentWillUpdate\n\n' +
965 'The above lifecycles should be removed. Learn more about this warning here:\n' +
966 - 'https://reactjs.org/link/unsafe-component-lifecycles',
966 + 'https://react.dev/link/unsafe-component-lifecycles',
967 );
968 }).toWarnDev(['componentWillMount has been renamed'], {
969 withoutStack: true,
@@ -990,7 +990,7 @@ describe('ReactComponentLifeCycle', () => {
990 'WillReceiveProps uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
991 ' componentWillReceiveProps\n\n' +
992 'The above lifecycles should be removed. Learn more about this warning here:\n' +
993 - 'https://reactjs.org/link/unsafe-component-lifecycles',
993 + 'https://react.dev/link/unsafe-component-lifecycles',
994 );
995 }).toWarnDev(['componentWillReceiveProps has been renamed'], {
996 withoutStack: true,
@@ -1023,7 +1023,7 @@ describe('ReactComponentLifeCycle', () => {
1023 ' UNSAFE_componentWillReceiveProps\n' +
1024 ' componentWillUpdate\n\n' +
1025 'The above lifecycles should be removed. Learn more about this warning here:\n' +
1026 - 'https://reactjs.org/link/unsafe-component-lifecycles',
1026 + 'https://react.dev/link/unsafe-component-lifecycles',
1027 );
1028 }).toWarnDev(
1029 [
@@ -1052,7 +1052,7 @@ describe('ReactComponentLifeCycle', () => {
1052 'WillMount uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
1053 ' UNSAFE_componentWillMount\n\n' +
1054 'The above lifecycles should be removed. Learn more about this warning here:\n' +
1055 - 'https://reactjs.org/link/unsafe-component-lifecycles',
1055 + 'https://react.dev/link/unsafe-component-lifecycles',
1056 );
1057
1058 class WillMountAndUpdate extends React.Component {
@@ -1077,7 +1077,7 @@ describe('ReactComponentLifeCycle', () => {
1077 ' componentWillMount\n' +
1078 ' UNSAFE_componentWillUpdate\n\n' +
1079 'The above lifecycles should be removed. Learn more about this warning here:\n' +
1080 - 'https://reactjs.org/link/unsafe-component-lifecycles',
1080 + 'https://react.dev/link/unsafe-component-lifecycles',
1081 );
1082 }).toWarnDev(['componentWillMount has been renamed'], {
1083 withoutStack: true,
@@ -1104,7 +1104,7 @@ describe('ReactComponentLifeCycle', () => {
1104 'WillReceiveProps uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
1105 ' componentWillReceiveProps\n\n' +
1106 'The above lifecycles should be removed. Learn more about this warning here:\n' +
1107 - 'https://reactjs.org/link/unsafe-component-lifecycles',
1107 + 'https://react.dev/link/unsafe-component-lifecycles',
1108 );
1109 }).toWarnDev(['componentWillReceiveProps has been renamed'], {
1110 withoutStack: true,
@@ -1570,20 +1570,20 @@ describe('ReactComponentLifeCycle', () => {
1570 }).toWarnDev(
1571 [
1572 /* eslint-disable max-len */
1573 - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1573 + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
1574
1575 * Move code with side effects to componentDidMount, and set initial state in the constructor.
1576 * 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.
1577
1578 Please update the following components: MyComponent`,
1579 - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1579 + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
1580
1581 * Move data fetching code or side effects to componentDidUpdate.
1582 -* 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
1582 +* 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
1583 * 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.
1584
1585 Please update the following components: MyComponent`,
1586 - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1586 + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
1587
1588 * Move data fetching code or side effects to componentDidUpdate.
1589 * 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.
packages/react-dom/src/__tests__/ReactDOMAttribute-test.js
+2 -2
@@ -143,7 +143,7 @@ describe('ReactDOM unknown attribute', () => {
143 await expect(() => testUnknownAttributeRemoval(Symbol('foo'))).toErrorDev(
144 'Warning: Invalid value for prop `unknown` on <div> tag. Either remove it ' +
145 'from the element, or pass a string or number value to keep it ' +
146 - 'in the DOM. For details, see https://reactjs.org/link/attribute-behavior \n' +
146 + 'in the DOM. For details, see https://react.dev/link/attribute-behavior \n' +
147 ' in div (at **)',
148 );
149 });
@@ -155,7 +155,7 @@ describe('ReactDOM unknown attribute', () => {
155 'Warning: Invalid value for prop `unknown` on <div> tag. Either remove ' +
156 'it from the element, or pass a string or number value to ' +
157 'keep it in the DOM. For details, see ' +
158 - 'https://reactjs.org/link/attribute-behavior \n' +
158 + 'https://react.dev/link/attribute-behavior \n' +
159 ' in div (at **)',
160 );
161 });
packages/react-dom/src/__tests__/ReactDOMComponent-test.js
+5 -5
@@ -192,7 +192,7 @@ describe('ReactDOMComponent', () => {
192 }).toErrorDev(
193 'Warning: Invalid value for prop `foo` on <div> tag. Either remove it ' +
194 'from the element, or pass a string or number value to keep ' +
195 - 'it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' +
195 + 'it in the DOM. For details, see https://react.dev/link/attribute-behavior ' +
196 '\n in div (at **)',
197 );
198 });
@@ -207,7 +207,7 @@ describe('ReactDOMComponent', () => {
207 }).toErrorDev(
208 'Warning: Invalid values for props `foo`, `baz` on <div> tag. Either remove ' +
209 'them from the element, or pass a string or number value to keep ' +
210 - 'them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' +
210 + 'them in the DOM. For details, see https://react.dev/link/attribute-behavior ' +
211 '\n in div (at **)',
212 );
213 });
@@ -1817,7 +1817,7 @@ describe('ReactDOMComponent', () => {
1817 await mountComponent({children: '', dangerouslySetInnerHTML: ''});
1818 }).rejects.toThrowError(
1819 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1820 - 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.',
1820 + 'Please visit https://react.dev/link/dangerously-set-inner-html for more information.',
1821 );
1822 });
1823
@@ -1838,7 +1838,7 @@ describe('ReactDOMComponent', () => {
1838 await mountComponent({dangerouslySetInnerHTML: '<span>Hi Jim!</span>'});
1839 }).rejects.toThrowError(
1840 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1841 - 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.',
1841 + 'Please visit https://react.dev/link/dangerously-set-inner-html for more information.',
1842 );
1843 });
1844
@@ -1847,7 +1847,7 @@ describe('ReactDOMComponent', () => {
1847 await mountComponent({dangerouslySetInnerHTML: {foo: 'bar'}});
1848 }).rejects.toThrowError(
1849 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1850 - 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.',
1850 + 'Please visit https://react.dev/link/dangerously-set-inner-html for more information.',
1851 );
1852 });
1853
packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js
+1 -1
@@ -201,7 +201,7 @@ describe('ReactDOMComponentTree', () => {
201 'a defined value, which should not happen. ' +
202 'Decide between using a controlled or uncontrolled input ' +
203 'element for the lifetime of the component. More info: ' +
204 - 'https://reactjs.org/link/controlled-components',
204 + 'https://react.dev/link/controlled-components',
205 );
206 });
207 });
packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
+1 -1
@@ -1830,7 +1830,7 @@ describe('ReactDOMFizzServer', () => {
1830 if (__DEV__) {
1831 expect(mockError).toHaveBeenCalledWith(
1832 'Warning: Each child in a list should have a unique "key" prop.%s%s' +
1833 - ' See https://reactjs.org/link/warning-keys for more information.%s',
1833 + ' See https://react.dev/link/warning-keys for more information.%s',
1834 '\n\nCheck the top-level render call using <div>.',
1835 '',
1836 '\n' +
packages/react-dom/src/__tests__/ReactDOMFloat-test.js
+1 -1
@@ -2194,7 +2194,7 @@ body {
2194 ' parent component, remove it from the DOM element.',
2195 'Invalid values for props `shouldnotincludefunctions`, `norsymbols` on <link> tag. Either remove them from' +
2196 ' the element, or pass a string or number value to keep them in the DOM. For' +
2197 - ' details, see https://reactjs.org/link/attribute-behavior',
2197 + ' details, see https://react.dev/link/attribute-behavior',
2198 ]);
2199
2200 // Now we flush the stylesheet with the boundary
packages/react-dom/src/__tests__/ReactDOMInput-test.js
+18 -18
@@ -1996,7 +1996,7 @@ describe('ReactDOMInput', () => {
1996 '(specify either the checked prop, or the defaultChecked prop, but not ' +
1997 'both). Decide between using a controlled or uncontrolled input ' +
1998 'element and remove one of these props. More info: ' +
1999 - 'https://reactjs.org/link/controlled-components',
1999 + 'https://react.dev/link/controlled-components',
2000 );
2001 root.unmount();
2002
@@ -2026,7 +2026,7 @@ describe('ReactDOMInput', () => {
2026 '(specify either the value prop, or the defaultValue prop, but not ' +
2027 'both). Decide between using a controlled or uncontrolled input ' +
2028 'element and remove one of these props. More info: ' +
2029 - 'https://reactjs.org/link/controlled-components',
2029 + 'https://react.dev/link/controlled-components',
2030 );
2031 await (() => {
2032 root.unmount();
@@ -2055,7 +2055,7 @@ describe('ReactDOMInput', () => {
2055 'This is likely caused by the value changing from a defined to ' +
2056 'undefined, which should not happen. ' +
2057 'Decide between using a controlled or uncontrolled input ' +
2058 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2058 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2059 ' in input (at **)',
2060 );
2061 });
@@ -2078,7 +2078,7 @@ describe('ReactDOMInput', () => {
2078 'This is likely caused by the value changing from a defined to ' +
2079 'undefined, which should not happen. ' +
2080 'Decide between using a controlled or uncontrolled input ' +
2081 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2081 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2082 ' in input (at **)',
2083 ]);
2084 });
@@ -2099,7 +2099,7 @@ describe('ReactDOMInput', () => {
2099 'This is likely caused by the value changing from a defined to ' +
2100 'undefined, which should not happen. ' +
2101 'Decide between using a controlled or uncontrolled input ' +
2102 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2102 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2103 ' in input (at **)',
2104 );
2105 });
@@ -2118,7 +2118,7 @@ describe('ReactDOMInput', () => {
2118 'This is likely caused by the value changing from undefined to ' +
2119 'a defined value, which should not happen. ' +
2120 'Decide between using a controlled or uncontrolled input ' +
2121 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2121 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2122 ' in input (at **)',
2123 );
2124 });
@@ -2142,7 +2142,7 @@ describe('ReactDOMInput', () => {
2142 'This is likely caused by the value changing from undefined to ' +
2143 'a defined value, which should not happen. ' +
2144 'Decide between using a controlled or uncontrolled input ' +
2145 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2145 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2146 ' in input (at **)',
2147 );
2148 });
@@ -2163,7 +2163,7 @@ describe('ReactDOMInput', () => {
2163 'This is likely caused by the value changing from a defined to ' +
2164 'undefined, which should not happen. ' +
2165 'Decide between using a controlled or uncontrolled input ' +
2166 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2166 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2167 ' in input (at **)',
2168 );
2169 });
@@ -2184,7 +2184,7 @@ describe('ReactDOMInput', () => {
2184 'This is likely caused by the value changing from a defined to ' +
2185 'undefined, which should not happen. ' +
2186 'Decide between using a controlled or uncontrolled input ' +
2187 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2187 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2188 ' in input (at **)',
2189 );
2190 });
@@ -2205,7 +2205,7 @@ describe('ReactDOMInput', () => {
2205 'This is likely caused by the value changing from a defined to ' +
2206 'undefined, which should not happen. ' +
2207 'Decide between using a controlled or uncontrolled input ' +
2208 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2208 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2209 ' in input (at **)',
2210 );
2211 });
@@ -2224,7 +2224,7 @@ describe('ReactDOMInput', () => {
2224 'This is likely caused by the value changing from undefined to ' +
2225 'a defined value, which should not happen. ' +
2226 'Decide between using a controlled or uncontrolled input ' +
2227 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2227 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2228 ' in input (at **)',
2229 );
2230 });
@@ -2243,7 +2243,7 @@ describe('ReactDOMInput', () => {
2243 'This is likely caused by the value changing from undefined to ' +
2244 'a defined value, which should not happen. ' +
2245 'Decide between using a controlled or uncontrolled input ' +
2246 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2246 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2247 ' in input (at **)',
2248 );
2249 });
@@ -2262,7 +2262,7 @@ describe('ReactDOMInput', () => {
2262 'This is likely caused by the value changing from a defined to ' +
2263 'undefined, which should not happen. ' +
2264 'Decide between using a controlled or uncontrolled input ' +
2265 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2265 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2266 ' in input (at **)',
2267 );
2268 });
@@ -2281,7 +2281,7 @@ describe('ReactDOMInput', () => {
2281 'This is likely caused by the value changing from a defined to ' +
2282 'undefined, which should not happen. ' +
2283 'Decide between using a controlled or uncontrolled input ' +
2284 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2284 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2285 ' in input (at **)',
2286 );
2287 });
@@ -2300,7 +2300,7 @@ describe('ReactDOMInput', () => {
2300 'This is likely caused by the value changing from a defined to ' +
2301 'undefined, which should not happen. ' +
2302 'Decide between using a controlled or uncontrolled input ' +
2303 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2303 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2304 ' in input (at **)',
2305 );
2306 });
@@ -2319,7 +2319,7 @@ describe('ReactDOMInput', () => {
2319 'This is likely caused by the value changing from undefined to ' +
2320 'a defined value, which should not happen. ' +
2321 'Decide between using a controlled or uncontrolled input ' +
2322 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2322 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2323 ' in input (at **)',
2324 );
2325 });
@@ -2338,7 +2338,7 @@ describe('ReactDOMInput', () => {
2338 'This is likely caused by the value changing from undefined to ' +
2339 'a defined value, which should not happen. ' +
2340 'Decide between using a controlled or uncontrolled input ' +
2341 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2341 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2342 ' in input (at **)',
2343 );
2344 });
@@ -2402,7 +2402,7 @@ describe('ReactDOMInput', () => {
2402 'This is likely caused by the value changing from a defined to ' +
2403 'undefined, which should not happen. ' +
2404 'Decide between using a controlled or uncontrolled input ' +
2405 - 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
2405 + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components\n' +
2406 ' in input (at **)',
2407 );
2408 });
packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js
+2 -2
@@ -37,7 +37,7 @@ describe('ReactDOMInvalidARIAHook', () => {
37 it('should warn for one invalid aria-* prop', async () => {
38 await expect(() => mountComponent({'aria-badprop': 'maybe'})).toErrorDev(
39 'Warning: Invalid aria prop `aria-badprop` on <div> tag. ' +
40 - 'For details, see https://reactjs.org/link/invalid-aria-props',
40 + 'For details, see https://react.dev/link/invalid-aria-props',
41 );
42 });
43 it('should warn for many invalid aria-* props', async () => {
@@ -48,7 +48,7 @@ describe('ReactDOMInvalidARIAHook', () => {
48 }),
49 ).toErrorDev(
50 'Warning: Invalid aria props `aria-badprop`, `aria-malprop` on <div> ' +
51 - 'tag. For details, see https://reactjs.org/link/invalid-aria-props',
51 + 'tag. For details, see https://react.dev/link/invalid-aria-props',
52 );
53 });
54 it('should warn for an improperly cased aria-* prop', async () => {
packages/react-dom/src/__tests__/ReactDOMSelect-test.js
+1 -1
@@ -875,7 +875,7 @@ describe('ReactDOMSelect', () => {
875 '(specify either the value prop, or the defaultValue prop, but not ' +
876 'both). Decide between using a controlled or uncontrolled select ' +
877 'element and remove one of these props. More info: ' +
878 - 'https://reactjs.org/link/controlled-components',
878 + 'https://react.dev/link/controlled-components',
879 );
880
881 await act(() => {
packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
+2 -2
@@ -150,7 +150,7 @@ describe('ReactDOMServerHooks', () => {
150 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
151 '2. You might be breaking the Rules of Hooks\n' +
152 '3. You might have more than one copy of React in the same app\n' +
153 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
153 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
154 );
155
156 itRenders('multiple times when an updater is called', async render => {
@@ -672,7 +672,7 @@ describe('ReactDOMServerHooks', () => {
672 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
673 '2. You might be breaking the Rules of Hooks\n' +
674 '3. You might have more than one copy of React in the same app\n' +
675 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
675 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
676 );
677 });
678
packages/react-dom/src/__tests__/ReactDOMServerIntegrationRefs-test.js
+1 -1
@@ -99,7 +99,7 @@ describe('ReactDOMServerIntegration', () => {
99 'Warning: Component "RefsComponent" contains the string ref "myDiv". ' +
100 'Support for string refs will be removed in a future major release. ' +
101 'We recommend using useRef() or createRef() instead. ' +
102 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
102 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
103 ' in RefsComponent (at **)',
104 ]);
105 expect(component.refs.myDiv).toBe(root.firstChild);
packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js
+1 -1
@@ -295,7 +295,7 @@ describe('ReactDOMServerLifecycles', () => {
295 }
296
297 expect(() => ReactDOMServer.renderToString(<MyComponent />)).toWarnDev(
298 - 'componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
298 + 'componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
299 '* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\n\n' +
300 'Please update the following components: MyComponent',
301 );
packages/react-dom/src/__tests__/ReactDOMTextarea-test.js
+1 -1
@@ -742,7 +742,7 @@ describe('ReactDOMTextarea', () => {
742 '(specify either the value prop, or the defaultValue prop, but not ' +
743 'both). Decide between using a controlled or uncontrolled textarea ' +
744 'and remove one of these props. More info: ' +
745 - 'https://reactjs.org/link/controlled-components',
745 + 'https://react.dev/link/controlled-components',
746 );
747
748 container = document.createElement('div');
packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.js
+5 -5
@@ -83,7 +83,7 @@ describe('ReactDeprecationWarnings', () => {
83 'Support for string refs will be removed in a future major release. ' +
84 'We recommend using useRef() or createRef() instead. ' +
85 'Learn more about using refs safely here: ' +
86 - 'https://reactjs.org/link/strict-mode-string-ref' +
86 + 'https://react.dev/link/strict-mode-string-ref' +
87 '\n in Component (at **)',
88 );
89 });
@@ -134,11 +134,11 @@ describe('ReactDeprecationWarnings', () => {
134 'This case cannot be automatically converted to an arrow function. ' +
135 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +
136 'Learn more about using refs safely here: ' +
137 - 'https://reactjs.org/link/strict-mode-string-ref',
137 + 'https://react.dev/link/strict-mode-string-ref',
138 'Warning: Component "Component" contains the string ref "refComponent". ' +
139 'Support for string refs will be removed in a future major release. We recommend ' +
140 'using useRef() or createRef() instead. Learn more about using refs safely here: ' +
141 - 'https://reactjs.org/link/strict-mode-string-ref',
141 + 'https://react.dev/link/strict-mode-string-ref',
142 ]);
143 });
144
@@ -170,11 +170,11 @@ describe('ReactDeprecationWarnings', () => {
170 'This case cannot be automatically converted to an arrow function. ' +
171 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +
172 'Learn more about using refs safely here: ' +
173 - 'https://reactjs.org/link/strict-mode-string-ref',
173 + 'https://react.dev/link/strict-mode-string-ref',
174 'Warning: Component "Component" contains the string ref "refComponent". ' +
175 'Support for string refs will be removed in a future major release. We recommend ' +
176 'using useRef() or createRef() instead. Learn more about using refs safely here: ' +
177 - 'https://reactjs.org/link/strict-mode-string-ref',
177 + 'https://react.dev/link/strict-mode-string-ref',
178 ]);
179 });
180 });
packages/react-dom/src/__tests__/ReactFunctionComponent-test.js
+1 -1
@@ -195,7 +195,7 @@ describe('ReactFunctionComponent', () => {
195 '1. You may be adding a ref to a function component\n' +
196 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
197 '3. You have multiple copies of React loaded\n' +
198 - 'See https://reactjs.org/link/refs-must-have-owner for more information.',
198 + 'See https://react.dev/link/refs-must-have-owner for more information.',
199 );
200 });
201
packages/react-dom/src/__tests__/ReactTestUtils-test.js
+1 -1
@@ -44,7 +44,7 @@ describe('ReactTestUtils', () => {
44 expect(() => ReactTestUtils.mockComponent(MockedComponent)).toWarnDev(
45 'ReactTestUtils.mockComponent() is deprecated. ' +
46 'Use shallow rendering or jest.mock() instead.\n\n' +
47 - 'See https://reactjs.org/link/test-utils-mock-component for more information.',
47 + 'See https://react.dev/link/test-utils-mock-component for more information.',
48 {withoutStack: true},
49 );
50
packages/react-dom/src/__tests__/findDOMNode-test.js
+2 -2
@@ -122,7 +122,7 @@ describe('findDOMNode', () => {
122 'findDOMNode was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
123 'Instead, add a ref directly to the element you want to reference. ' +
124 'Learn more about using refs safely here: ' +
125 - 'https://reactjs.org/link/strict-mode-find-node' +
125 + 'https://react.dev/link/strict-mode-find-node' +
126 '\n in div (at **)' +
127 '\n in ContainsStrictModeChild (at **)',
128 ]);
@@ -151,7 +151,7 @@ describe('findDOMNode', () => {
151 'findDOMNode was passed an instance of IsInStrictMode which is inside StrictMode. ' +
152 'Instead, add a ref directly to the element you want to reference. ' +
153 'Learn more about using refs safely here: ' +
154 - 'https://reactjs.org/link/strict-mode-find-node' +
154 + 'https://react.dev/link/strict-mode-find-node' +
155 '\n in div (at **)' +
156 '\n in IsInStrictMode (at **)',
157 ]);
packages/react-dom/src/__tests__/multiple-copies-of-react-test.js
+1 -1
@@ -36,7 +36,7 @@ describe('when different React version is used with string ref', () => {
36 '1. You may be adding a ref to a function component\n' +
37 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
38 '3. You have multiple copies of React loaded\n' +
39 - 'See https://reactjs.org/link/refs-must-have-owner for more information.',
39 + 'See https://react.dev/link/refs-must-have-owner for more information.',
40 );
41 });
42 });
packages/react-dom/src/__tests__/refs-test.js
+6 -6
@@ -134,13 +134,13 @@ describe('reactiverefs', () => {
134 'Warning: Component "div" contains the string ref "resetDiv". ' +
135 'Support for string refs will be removed in a future major release. ' +
136 'We recommend using useRef() or createRef() instead. ' +
137 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
137 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
138 ' in div (at **)\n' +
139 ' in TestRefsComponent (at **)',
140 'Warning: Component "span" contains the string ref "clickLog0". ' +
141 'Support for string refs will be removed in a future major release. ' +
142 'We recommend using useRef() or createRef() instead. ' +
143 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
143 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
144 ' in span (at **)\n' +
145 ' in ClickCounter (at **)\n' +
146 ' in div (at **)\n' +
@@ -386,7 +386,7 @@ describe('ref swapping', () => {
386 'Warning: Component "A" contains the string ref "1". ' +
387 'Support for string refs will be removed in a future major release. ' +
388 'We recommend using useRef() or createRef() instead. ' +
389 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
389 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
390 ' in A (at **)',
391 ]);
392 expect(a.refs[1].nodeName).toBe('DIV');
@@ -561,7 +561,7 @@ describe('creating element with string ref in constructor', () => {
561 '1. You may be adding a ref to a function component\n' +
562 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
563 '3. You have multiple copies of React loaded\n' +
564 - 'See https://reactjs.org/link/refs-must-have-owner for more information.',
564 + 'See https://react.dev/link/refs-must-have-owner for more information.',
565 );
566 });
567 });
@@ -619,7 +619,7 @@ describe('strings refs across renderers', () => {
619 'Warning: Component "Indirection" contains the string ref "child1". ' +
620 'Support for string refs will be removed in a future major release. ' +
621 'We recommend using useRef() or createRef() instead. ' +
622 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
622 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
623 ' in Indirection (at **)\n' +
624 ' in Parent (at **)',
625 ]);
@@ -638,7 +638,7 @@ describe('strings refs across renderers', () => {
638 'Warning: Component "Root" contains the string ref "child2". ' +
639 'Support for string refs will be removed in a future major release. ' +
640 'We recommend using useRef() or createRef() instead. ' +
641 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
641 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref',
642 ],
643 {withoutStack: true},
644 );
packages/react-dom/src/client/ReactDOM.js
+3 -3
@@ -82,7 +82,7 @@ if (__DEV__) {
82 ) {
83 console.error(
84 'React depends on Map and Set built-in types. Make sure that you load a ' +
85 - 'polyfill in older browsers. https://reactjs.org/link/react-polyfills',
85 + 'polyfill in older browsers. https://react.dev/link/react-polyfills',
86 );
87 }
88 }
@@ -220,10 +220,10 @@ if (__DEV__) {
220 console.info(
221 '%cDownload the React DevTools ' +
222 'for a better development experience: ' +
223 - 'https://reactjs.org/link/react-devtools' +
223 + 'https://react.dev/link/react-devtools' +
224 (protocol === 'file:'
225 ? '\nYou might need to use a local HTTP server (instead of file://): ' +
226 - 'https://reactjs.org/link/react-devtools-faq'
226 + 'https://react.dev/link/react-devtools-faq'
227 : ''),
228 'font-weight:bold',
229 );
packages/react-dom/src/client/ReactDOMLegacy.js
+3 -3
@@ -269,7 +269,7 @@ export function hydrate(
269 'ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' +
270 'instead. Until you switch to the new API, your app will behave as ' +
271 "if it's running React 17. Learn " +
272 - 'more: https://reactjs.org/link/switch-to-createroot',
272 + 'more: https://react.dev/link/switch-to-createroot',
273 );
274 }
275
@@ -309,7 +309,7 @@ export function render(
309 'ReactDOM.render is no longer supported in React 18. Use createRoot ' +
310 'instead. Until you switch to the new API, your app will behave as ' +
311 "if it's running React 17. Learn " +
312 - 'more: https://reactjs.org/link/switch-to-createroot',
312 + 'more: https://react.dev/link/switch-to-createroot',
313 );
314 }
315
@@ -349,7 +349,7 @@ export function unstable_renderSubtreeIntoContainer(
349 'ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' +
350 'in React 18. Consider using a portal instead. Until you switch to ' +
351 "the createRoot API, your app will behave as if it's running React " +
352 - '17. Learn more: https://reactjs.org/link/switch-to-createroot',
352 + '17. Learn more: https://react.dev/link/switch-to-createroot',
353 );
354 }
355
packages/react-dom/src/test-utils/ReactTestUtils.js
+1 -1
@@ -330,7 +330,7 @@ function mockComponent(module, mockTagName) {
330 console.warn(
331 'ReactTestUtils.mockComponent() is deprecated. ' +
332 'Use shallow rendering or jest.mock() instead.\n\n' +
333 - 'See https://reactjs.org/link/test-utils-mock-component for more information.',
333 + 'See https://react.dev/link/test-utils-mock-component for more information.',
334 );
335 }
336 }
packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js
+4 -4
@@ -902,7 +902,7 @@ describe('ReactFabric', () => {
902 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
903 'Instead, add a ref directly to the element you want to reference. ' +
904 'Learn more about using refs safely here: ' +
905 - 'https://reactjs.org/link/strict-mode-find-node' +
905 + 'https://react.dev/link/strict-mode-find-node' +
906 '\n in RCTView (at **)' +
907 '\n in ContainsStrictModeChild (at **)',
908 ]);
@@ -941,7 +941,7 @@ describe('ReactFabric', () => {
941 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' +
942 'Instead, add a ref directly to the element you want to reference. ' +
943 'Learn more about using refs safely here: ' +
944 - 'https://reactjs.org/link/strict-mode-find-node' +
944 + 'https://react.dev/link/strict-mode-find-node' +
945 '\n in RCTView (at **)' +
946 '\n in IsInStrictMode (at **)',
947 ]);
@@ -980,7 +980,7 @@ describe('ReactFabric', () => {
980 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
981 'Instead, add a ref directly to the element you want to reference. ' +
982 'Learn more about using refs safely here: ' +
983 - 'https://reactjs.org/link/strict-mode-find-node' +
983 + 'https://react.dev/link/strict-mode-find-node' +
984 '\n in RCTView (at **)' +
985 '\n in ContainsStrictModeChild (at **)',
986 ]);
@@ -1019,7 +1019,7 @@ describe('ReactFabric', () => {
1019 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' +
1020 'Instead, add a ref directly to the element you want to reference. ' +
1021 'Learn more about using refs safely here: ' +
1022 - 'https://reactjs.org/link/strict-mode-find-node' +
1022 + 'https://react.dev/link/strict-mode-find-node' +
1023 '\n in RCTView (at **)' +
1024 '\n in IsInStrictMode (at **)',
1025 ]);
packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js
+4 -4
@@ -549,7 +549,7 @@ describe('ReactNative', () => {
549 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
550 'Instead, add a ref directly to the element you want to reference. ' +
551 'Learn more about using refs safely here: ' +
552 - 'https://reactjs.org/link/strict-mode-find-node' +
552 + 'https://react.dev/link/strict-mode-find-node' +
553 '\n in RCTView (at **)' +
554 '\n in ContainsStrictModeChild (at **)',
555 ]);
@@ -586,7 +586,7 @@ describe('ReactNative', () => {
586 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' +
587 'Instead, add a ref directly to the element you want to reference. ' +
588 'Learn more about using refs safely here: ' +
589 - 'https://reactjs.org/link/strict-mode-find-node' +
589 + 'https://react.dev/link/strict-mode-find-node' +
590 '\n in RCTView (at **)' +
591 '\n in IsInStrictMode (at **)',
592 ]);
@@ -620,7 +620,7 @@ describe('ReactNative', () => {
620 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
621 'Instead, add a ref directly to the element you want to reference. ' +
622 'Learn more about using refs safely here: ' +
623 - 'https://reactjs.org/link/strict-mode-find-node' +
623 + 'https://react.dev/link/strict-mode-find-node' +
624 '\n in RCTView (at **)' +
625 '\n in ContainsStrictModeChild (at **)',
626 ]);
@@ -655,7 +655,7 @@ describe('ReactNative', () => {
655 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' +
656 'Instead, add a ref directly to the element you want to reference. ' +
657 'Learn more about using refs safely here: ' +
658 - 'https://reactjs.org/link/strict-mode-find-node' +
658 + 'https://react.dev/link/strict-mode-find-node' +
659 '\n in RCTView (at **)' +
660 '\n in IsInStrictMode (at **)',
661 ]);
packages/react-native-renderer/src/legacy-events/SyntheticEvent.js
+1 -1
@@ -282,7 +282,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
282 "This synthetic event is reused for performance reasons. If you're seeing this, " +
283 "you're %s `%s` on a released/nullified synthetic event. %s. " +
284 'If you must keep the original synthetic event around, use event.persist(). ' +
285 - 'See https://reactjs.org/link/event-pooling for more information.',
285 + 'See https://react.dev/link/event-pooling for more information.',
286 action,
287 propName,
288 result,
packages/react-reconciler/src/ReactChildFiber.js
+4 -4
@@ -132,7 +132,7 @@ if (__DEV__) {
132
133 console.error(
134 'Each child in a list should have a unique ' +
135 - '"key" prop. See https://reactjs.org/link/warning-keys for ' +
135 + '"key" prop. See https://react.dev/link/warning-keys for ' +
136 'more information.',
137 );
138 };
@@ -172,7 +172,7 @@ function convertStringRefToCallbackRef(
172 '1. You may be adding a ref to a function component\n' +
173 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
174 '3. You have multiple copies of React loaded\n' +
175 - 'See https://reactjs.org/link/refs-must-have-owner for more information.',
175 + 'See https://react.dev/link/refs-must-have-owner for more information.',
176 );
177 }
178 if (owner.tag !== ClassComponent) {
@@ -180,7 +180,7 @@ function convertStringRefToCallbackRef(
180 'Function components cannot have string refs. ' +
181 'We recommend using useRef() instead. ' +
182 'Learn more about using refs safely here: ' +
183 - 'https://reactjs.org/link/strict-mode-string-ref',
183 + 'https://react.dev/link/strict-mode-string-ref',
184 );
185 }
186
@@ -197,7 +197,7 @@ function convertStringRefToCallbackRef(
197 'will be removed in a future major release. We recommend using ' +
198 'useRef() or createRef() instead. ' +
199 'Learn more about using refs safely here: ' +
200 - 'https://reactjs.org/link/strict-mode-string-ref',
200 + 'https://react.dev/link/strict-mode-string-ref',
201 componentName,
202 stringRef,
203 );
packages/react-reconciler/src/ReactFiberClassComponent.js
+1 -1
@@ -730,7 +730,7 @@ function constructClassInstance(
730 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
731 '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' +
732 'The above lifecycles should be removed. Learn more about this warning here:\n' +
733 - 'https://reactjs.org/link/unsafe-component-lifecycles',
733 + 'https://react.dev/link/unsafe-component-lifecycles',
734 componentName,
735 newApiName,
736 foundWillMountName !== null ? `\n ${foundWillMountName}` : '',
packages/react-reconciler/src/ReactFiberCommitWork.js
+1 -1
@@ -703,7 +703,7 @@ function commitHookEffectListMount(flags: HookFlags, finishedWork: Fiber) {
703 ' }\n' +
704 ' fetchData();\n' +
705 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
706 - 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
706 + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching';
707 } else {
708 addendum = ' You returned: ' + destroy;
709 }
packages/react-reconciler/src/ReactFiberDevToolsHook.js
+1 -1
@@ -68,7 +68,7 @@ export function injectInternals(internals: Object): boolean {
68 console.error(
69 'The installed version of React DevTools is too old and will not work ' +
70 'with the current version of React. Please update React DevTools. ' +
71 - 'https://reactjs.org/link/react-devtools',
71 + 'https://react.dev/link/react-devtools',
72 );
73 }
74 // DevTools exists, even though it doesn't support Fiber.
packages/react-reconciler/src/ReactFiberErrorLogger.js
+1 -1
@@ -61,7 +61,7 @@ export function logCapturedError(
61 if (boundary.tag === HostRoot) {
62 errorBoundaryMessage =
63 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
64 - 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
64 + 'Visit https://react.dev/link/error-boundaries to learn more about error boundaries.';
65 } else {
66 const errorBoundaryName =
67 getComponentNameFromFiber(boundary) || 'Anonymous';
packages/react-reconciler/src/ReactFiberHooks.js
+3 -3
@@ -374,7 +374,7 @@ function warnOnHookMismatchInDev(currentHookName: HookType): void {
374 console.error(
375 'React has detected a change in the order of Hooks called by %s. ' +
376 'This will lead to bugs and errors if not fixed. ' +
377 - 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
377 + 'For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
378 ' Previous render Next render\n' +
379 ' ------------------------------------------------------\n' +
380 '%s' +
@@ -420,7 +420,7 @@ function throwInvalidHookError() {
420 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
421 '2. You might be breaking the Rules of Hooks\n' +
422 '3. You might have more than one copy of React in the same app\n' +
423 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
423 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
424 );
425 }
426
@@ -3604,7 +3604,7 @@ if (__DEV__) {
3604 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' +
3605 'You can only call Hooks at the top level of your React function. ' +
3606 'For more information, see ' +
3607 - 'https://reactjs.org/link/rules-of-hooks',
3607 + 'https://react.dev/link/rules-of-hooks',
3608 );
3609 };
3610
packages/react-reconciler/src/ReactFiberReconciler.js
+2 -2
@@ -209,7 +209,7 @@ function findHostInstanceWithWarning(
209 '%s was passed an instance of %s which is inside StrictMode. ' +
210 'Instead, add a ref directly to the element you want to reference. ' +
211 'Learn more about using refs safely here: ' +
212 - 'https://reactjs.org/link/strict-mode-find-node',
212 + 'https://react.dev/link/strict-mode-find-node',
213 methodName,
214 methodName,
215 componentName,
@@ -220,7 +220,7 @@ function findHostInstanceWithWarning(
220 '%s was passed an instance of %s which renders StrictMode children. ' +
221 'Instead, add a ref directly to the element you want to reference. ' +
222 'Learn more about using refs safely here: ' +
223 - 'https://reactjs.org/link/strict-mode-find-node',
223 + 'https://react.dev/link/strict-mode-find-node',
224 methodName,
225 methodName,
226 componentName,
packages/react-reconciler/src/ReactFiberWorkLoop.js
+3 -3
@@ -4023,7 +4023,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) {
4023 console.error(
4024 'Cannot update a component (`%s`) while rendering a ' +
4025 'different component (`%s`). To locate the bad setState() call inside `%s`, ' +
4026 - 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render',
4026 + 'follow the stack trace as described in https://react.dev/link/setstate-in-render',
4027 setStateComponentName,
4028 renderingComponentName,
4029 renderingComponentName,
@@ -4129,7 +4129,7 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber: Fiber): void {
4129 '/* assert on the output */\n\n' +
4130 "This ensures that you're testing the behavior the user would see " +
4131 'in the browser.' +
4132 - ' Learn more at https://reactjs.org/link/wrap-tests-with-act',
4132 + ' Learn more at https://react.dev/link/wrap-tests-with-act',
4133 getComponentNameFromFiber(fiber),
4134 );
4135 } finally {
@@ -4161,7 +4161,7 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root: FiberRoot): void {
4161 '/* assert on the output */\n\n' +
4162 "This ensures that you're testing the behavior the user would see " +
4163 'in the browser.' +
4164 - ' Learn more at https://reactjs.org/link/wrap-tests-with-act',
4164 + ' Learn more at https://react.dev/link/wrap-tests-with-act',
4165 );
4166 }
4167 }
packages/react-reconciler/src/ReactStrictModeWarnings.js
+9 -9
@@ -193,7 +193,7 @@ if (__DEV__) {
193 );
194 console.error(
195 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' +
196 - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
196 + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
197 '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' +
198 '\nPlease update the following components: %s',
199 sortedNames,
@@ -207,11 +207,11 @@ if (__DEV__) {
207 console.error(
208 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' +
209 'and may indicate bugs in your code. ' +
210 - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
210 + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
211 '* Move data fetching code or side effects to componentDidUpdate.\n' +
212 "* If you're updating state whenever props change, " +
213 'refactor your code to use memoization techniques or move it to ' +
214 - 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' +
214 + 'static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n' +
215 '\nPlease update the following components: %s',
216 sortedNames,
217 );
@@ -224,7 +224,7 @@ if (__DEV__) {
224 console.error(
225 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' +
226 'and may indicate bugs in your code. ' +
227 - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
227 + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
228 '* Move data fetching code or side effects to componentDidUpdate.\n' +
229 '\nPlease update the following components: %s',
230 sortedNames,
@@ -236,7 +236,7 @@ if (__DEV__) {
236
237 console.warn(
238 'componentWillMount has been renamed, and is not recommended for use. ' +
239 - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
239 + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
240 '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' +
241 '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' +
242 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' +
@@ -254,11 +254,11 @@ if (__DEV__) {
254
255 console.warn(
256 'componentWillReceiveProps has been renamed, and is not recommended for use. ' +
257 - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
257 + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
258 '* Move data fetching code or side effects to componentDidUpdate.\n' +
259 "* If you're updating state whenever props change, refactor your " +
260 'code to use memoization techniques or move it to ' +
261 - 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' +
261 + 'static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n' +
262 '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' +
263 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' +
264 'To rename all deprecated lifecycles to their new names, you can run ' +
@@ -273,7 +273,7 @@ if (__DEV__) {
273
274 console.warn(
275 'componentWillUpdate has been renamed, and is not recommended for use. ' +
276 - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
276 + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
277 '* Move data fetching code or side effects to componentDidUpdate.\n' +
278 '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' +
279 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' +
@@ -346,7 +346,7 @@ if (__DEV__) {
346 '\n\nThe old API will be supported in all 16.x releases, but applications ' +
347 'using it should migrate to the new version.' +
348 '\n\nPlease update the following components: %s' +
349 - '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context',
349 + '\n\nLearn more about this warning here: https://react.dev/link/legacy-context',
350 sortedNames,
351 );
352 } finally {
packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
+9 -9
@@ -57,7 +57,7 @@ describe('ReactHooks', () => {
57 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
58 '2. You might be breaking the Rules of Hooks\n' +
59 '3. You might have more than one copy of React in the same app\n' +
60 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
60 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
61 );
62 });
63 }
@@ -838,7 +838,7 @@ describe('ReactHooks', () => {
838 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
839 '2. You might be breaking the Rules of Hooks\n' +
840 '3. You might have more than one copy of React in the same app\n' +
841 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
841 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
842 );
843 // the next round, it does a fresh mount, so should render
844 expect(() => root.update(<MemoApp />)).not.toThrow(
@@ -847,7 +847,7 @@ describe('ReactHooks', () => {
847 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
848 '2. You might be breaking the Rules of Hooks\n' +
849 '3. You might have more than one copy of React in the same app\n' +
850 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
850 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
851 );
852 // and then again, fail
853 expect(() => root.update(<MemoApp />)).toThrow(
@@ -856,7 +856,7 @@ describe('ReactHooks', () => {
856 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
857 '2. You might be breaking the Rules of Hooks\n' +
858 '3. You might have more than one copy of React in the same app\n' +
859 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
859 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
860 );
861 });
862
@@ -1046,7 +1046,7 @@ describe('ReactHooks', () => {
1046 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks',
1047 'Warning: React has detected a change in the order of Hooks called by App. ' +
1048 'This will lead to bugs and errors if not fixed. For more information, ' +
1049 - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1049 + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
1050 ' Previous render Next render\n' +
1051 ' ------------------------------------------------------\n' +
1052 '1. useReducer useReducer\n' +
@@ -1504,7 +1504,7 @@ describe('ReactHooks', () => {
1504 }).toErrorDev([
1505 'Warning: React has detected a change in the order of Hooks called by App. ' +
1506 'This will lead to bugs and errors if not fixed. For more information, ' +
1507 - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1507 + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
1508 ' Previous render Next render\n' +
1509 ' ------------------------------------------------------\n' +
1510 `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameB)}\n` +
@@ -1554,7 +1554,7 @@ describe('ReactHooks', () => {
1554 }).toErrorDev([
1555 'Warning: React has detected a change in the order of Hooks called by App. ' +
1556 'This will lead to bugs and errors if not fixed. For more information, ' +
1557 - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1557 + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
1558 ' Previous render Next render\n' +
1559 ' ------------------------------------------------------\n' +
1560 `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameA)}\n` +
@@ -1633,7 +1633,7 @@ describe('ReactHooks', () => {
1633 }).toErrorDev([
1634 'Warning: React has detected a change in the order of Hooks called by App. ' +
1635 'This will lead to bugs and errors if not fixed. For more information, ' +
1636 - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1636 + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
1637 ' Previous render Next render\n' +
1638 ' ------------------------------------------------------\n' +
1639 `1. ${formatHookNamesToMatchErrorMessage(
@@ -1675,7 +1675,7 @@ describe('ReactHooks', () => {
1675 }).toErrorDev([
1676 'Warning: React has detected a change in the order of Hooks called by App. ' +
1677 'This will lead to bugs and errors if not fixed. For more information, ' +
1678 - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1678 + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
1679 ' Previous render Next render\n' +
1680 ' ------------------------------------------------------\n' +
1681 '1. useReducer useState\n' +
packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js
+5 -5
@@ -215,7 +215,7 @@ describe('ReactHooksWithNoopRenderer', () => {
215 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
216 '2. You might be breaking the Rules of Hooks\n' +
217 '3. You might have more than one copy of React in the same app\n' +
218 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
218 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
219 );
220
221 // Confirm that a subsequent hook works properly.
@@ -246,7 +246,7 @@ describe('ReactHooksWithNoopRenderer', () => {
246 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
247 '2. You might be breaking the Rules of Hooks\n' +
248 '3. You might have more than one copy of React in the same app\n' +
249 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
249 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
250 ),
251 ).toErrorDev(
252 'Warning: The <Counter /> component appears to be a function component that returns a class instance. ' +
@@ -276,7 +276,7 @@ describe('ReactHooksWithNoopRenderer', () => {
276 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
277 '2. You might be breaking the Rules of Hooks\n' +
278 '3. You might have more than one copy of React in the same app\n' +
279 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
279 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
280 {withoutStack: true},
281 );
282 });
@@ -3712,7 +3712,7 @@ describe('ReactHooksWithNoopRenderer', () => {
3712 }).toErrorDev([
3713 'Warning: React has detected a change in the order of Hooks called by App. ' +
3714 'This will lead to bugs and errors if not fixed. For more information, ' +
3715 - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
3715 + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
3716 ' Previous render Next render\n' +
3717 ' ------------------------------------------------------\n' +
3718 '1. useState useState\n' +
@@ -3809,7 +3809,7 @@ describe('ReactHooksWithNoopRenderer', () => {
3809 }).toErrorDev([
3810 'Warning: React has detected a change in the order of Hooks called by App. ' +
3811 'This will lead to bugs and errors if not fixed. For more information, ' +
3812 - 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
3812 + 'read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
3813 ' Previous render Next render\n' +
3814 ' ------------------------------------------------------\n' +
3815 '1. useEffect useEffect\n' +
packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js
+1 -1
@@ -1373,7 +1373,7 @@ describe('ReactIncrementalSideEffects', () => {
1373 'Warning: Component "Foo" contains the string ref "bar". ' +
1374 'Support for string refs will be removed in a future major release. ' +
1375 'We recommend using useRef() or createRef() instead. ' +
1376 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
1376 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
1377 ' in Foo (at **)',
1378 ]);
1379 expect(fooInstance.refs.bar.test).toEqual('test');
packages/react-reconciler/src/__tests__/ReactMemo-test.js
+5 -5
@@ -598,7 +598,7 @@ describe('memo', () => {
598 await expect(async () => {
599 await waitForAll([]);
600 }).toErrorDev(
601 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
601 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
602 ' in p (at **)',
603 );
604 });
@@ -615,7 +615,7 @@ describe('memo', () => {
615 await expect(async () => {
616 await waitForAll([]);
617 }).toErrorDev(
618 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
618 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
619 ' in Inner (at **)\n' +
620 ' in p (at **)',
621 );
@@ -635,7 +635,7 @@ describe('memo', () => {
635 await expect(async () => {
636 await waitForAll([]);
637 }).toErrorDev(
638 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
638 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
639 ' in Inner (at **)\n' +
640 ' in p (at **)',
641 );
@@ -654,7 +654,7 @@ describe('memo', () => {
654 await expect(async () => {
655 await waitForAll([]);
656 }).toErrorDev(
657 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
657 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
658 ' in Outer (at **)\n' +
659 ' in p (at **)',
660 );
@@ -675,7 +675,7 @@ describe('memo', () => {
675 await expect(async () => {
676 await waitForAll([]);
677 }).toErrorDev(
678 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
678 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
679 ' in Inner (at **)\n' +
680 ' in p (at **)',
681 );
packages/react-reconciler/src/__tests__/ReactNewContext-test.js
+1 -1
@@ -1337,7 +1337,7 @@ describe('ReactNewContext', () => {
1337 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
1338 '2. You might be breaking the Rules of Hooks\n' +
1339 '3. You might have more than one copy of React in the same app\n' +
1340 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
1340 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
1341 );
1342 });
1343
packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js
+1 -1
@@ -609,7 +609,7 @@ describe('ReactFlightDOMBrowser', () => {
609 await ReactServerDOMClient.createFromReadableStream(stream);
610 }).toErrorDev(
611 'Each child in a list should have a unique "key" prop. ' +
612 - 'See https://reactjs.org/link/warning-keys for more information.',
612 + 'See https://react.dev/link/warning-keys for more information.',
613 );
614 });
615
packages/react-server/src/ReactFizzClassComponent.js
+2 -2
@@ -292,7 +292,7 @@ export function constructClassInstance(
292 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
293 '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' +
294 'The above lifecycles should be removed. Learn more about this warning here:\n' +
295 - 'https://reactjs.org/link/unsafe-component-lifecycles',
295 + 'https://react.dev/link/unsafe-component-lifecycles',
296 componentName,
297 newApiName,
298 foundWillMountName !== null ? `\n ${foundWillMountName}` : '',
@@ -539,7 +539,7 @@ function callComponentWillMount(type: any, instance: any) {
539 console.warn(
540 // keep this warning in sync with ReactStrictModeWarning.js
541 'componentWillMount has been renamed, and is not recommended for use. ' +
542 - 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
542 + 'See https://react.dev/link/unsafe-component-lifecycles for details.\n\n' +
543 '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' +
544 'or the constructor.\n' +
545 '\nPlease update the following components: %s',
packages/react-server/src/ReactFizzHooks.js
+2 -2
@@ -106,7 +106,7 @@ function resolveCurrentlyRenderingComponent(): Object {
106 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
107 '2. You might be breaking the Rules of Hooks\n' +
108 '3. You might have more than one copy of React in the same app\n' +
109 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
109 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
110 );
111 }
112
@@ -116,7 +116,7 @@ function resolveCurrentlyRenderingComponent(): Object {
116 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' +
117 'You can only call Hooks at the top level of your React function. ' +
118 'For more information, see ' +
119 - 'https://reactjs.org/link/rules-of-hooks',
119 + 'https://react.dev/link/rules-of-hooks',
120 );
121 }
122 }
packages/react/src/ReactHooks.js
+1 -1
@@ -31,7 +31,7 @@ function resolveDispatcher() {
31 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
32 '2. You might be breaking the Rules of Hooks\n' +
33 '3. You might have more than one copy of React in the same app\n' +
34 - 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
34 + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
35 );
36 }
37 }
packages/react/src/__tests__/ReactChildren-test.js
+2 -2
@@ -1031,7 +1031,7 @@ describe('ReactChildren', () => {
1031 }).toErrorDev(
1032 'Warning: ' +
1033 'Each child in a list should have a unique "key" prop.' +
1034 - ' See https://reactjs.org/link/warning-keys for more information.' +
1034 + ' See https://react.dev/link/warning-keys for more information.' +
1035 '\n in ComponentReturningArray (at **)',
1036 );
1037 });
@@ -1060,7 +1060,7 @@ describe('ReactChildren', () => {
1060 }).toErrorDev(
1061 'Warning: ' +
1062 'Each child in a list should have a unique "key" prop.' +
1063 - ' See https://reactjs.org/link/warning-keys for more information.',
1063 + ' See https://react.dev/link/warning-keys for more information.',
1064 {withoutStack: true}, // There's nothing on the stack
1065 );
1066 });
packages/react/src/__tests__/ReactCoffeeScriptClass-test.coffee
+1 -1
@@ -551,7 +551,7 @@ describe 'ReactCoffeeScriptClass', ->
551 'Warning: Component "Foo" contains the string ref "inner". ' +
552 'Support for string refs will be removed in a future major release. ' +
553 'We recommend using useRef() or createRef() instead. ' +
554 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
554 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
555 ' in Foo (at **)'
556 ]);
557 expect(ref.current.refs.inner.getName()).toBe 'foo'
packages/react/src/__tests__/ReactCreateElement-test.js
+3 -3
@@ -75,7 +75,7 @@ describe('ReactCreateElement', () => {
75 'Child: `key` is not a prop. Trying to access it will result ' +
76 'in `undefined` being returned. If you need to access the same ' +
77 'value within the child component, you should pass it as a different ' +
78 - 'prop. (https://reactjs.org/link/special-props)',
78 + 'prop. (https://react.dev/link/special-props)',
79 );
80 });
81
@@ -85,7 +85,7 @@ describe('ReactCreateElement', () => {
85 'div: `key` is not a prop. Trying to access it will result ' +
86 'in `undefined` being returned. If you need to access the same ' +
87 'value within the child component, you should pass it as a different ' +
88 - 'prop. (https://reactjs.org/link/special-props)',
88 + 'prop. (https://react.dev/link/special-props)',
89 {withoutStack: true},
90 );
91 });
@@ -116,7 +116,7 @@ describe('ReactCreateElement', () => {
116 'Child: `ref` is not a prop. Trying to access it will result ' +
117 'in `undefined` being returned. If you need to access the same ' +
118 'value within the child component, you should pass it as a different ' +
119 - 'prop. (https://reactjs.org/link/special-props)',
119 + 'prop. (https://react.dev/link/special-props)',
120 );
121 });
122
packages/react/src/__tests__/ReactES6Class-test.js
+1 -1
@@ -590,7 +590,7 @@ describe('ReactES6Class', () => {
590 'Warning: Component "Foo" contains the string ref "inner". ' +
591 'Support for string refs will be removed in a future major release. ' +
592 'We recommend using useRef() or createRef() instead. ' +
593 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
593 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
594 ' in Foo (at **)',
595 ]);
596 expect(ref.current.refs.inner.getName()).toBe('foo');
packages/react/src/__tests__/ReactElementValidator-test.internal.js
+4 -4
@@ -89,7 +89,7 @@ describe('ReactElementValidator', () => {
89 await act(() => root.render(<Anonymous>{divs}</Anonymous>));
90 }).toErrorDev(
91 'Warning: Each child in a list should have a unique ' +
92 - '"key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
92 + '"key" prop. See https://react.dev/link/warning-keys for more information.\n' +
93 ' in div (at **)',
94 );
95 });
@@ -104,7 +104,7 @@ describe('ReactElementValidator', () => {
104 }).toErrorDev(
105 'Warning: Each child in a list should have a unique ' +
106 '"key" prop.\n\nCheck the top-level render call using <div>. See ' +
107 - 'https://reactjs.org/link/warning-keys for more information.\n' +
107 + 'https://react.dev/link/warning-keys for more information.\n' +
108 ' in div (at **)',
109 );
110 });
@@ -128,7 +128,7 @@ describe('ReactElementValidator', () => {
128 }).toErrorDev(
129 'Warning: Each child in a list should have a unique ' +
130 '"key" prop.\n\nCheck the render method of `Component`. See ' +
131 - 'https://reactjs.org/link/warning-keys for more information.\n' +
131 + 'https://react.dev/link/warning-keys for more information.\n' +
132 ' in div (at **)\n' +
133 ' in Component (at **)\n' +
134 ' in Parent (at **)\n' +
@@ -231,7 +231,7 @@ describe('ReactElementValidator', () => {
231 await act(() => root.render(React.createElement(ParentComp)));
232 }).toErrorDev(
233 'Each child in a list should have a unique "key" prop. ' +
234 - 'See https://reactjs.org/link/warning-keys for more information.\n' +
234 + 'See https://react.dev/link/warning-keys for more information.\n' +
235 ' in MyComp (at **)\n' +
236 ' in ParentComp (at **)',
237 );
packages/react/src/__tests__/ReactJSXElementValidator-test.js
+1 -1
@@ -195,7 +195,7 @@ describe('ReactJSXElementValidator', () => {
195 });
196 }).toErrorDev(
197 'Each child in a list should have a unique "key" prop. ' +
198 - 'See https://reactjs.org/link/warning-keys for more information.\n' +
198 + 'See https://react.dev/link/warning-keys for more information.\n' +
199 ' in MyComp (at **)\n' +
200 ' in ParentComp (at **)',
201 );
packages/react/src/__tests__/ReactJSXRuntime-test.js
+4 -4
@@ -216,7 +216,7 @@ describe('ReactJSXRuntime', () => {
216 'Child: `key` is not a prop. Trying to access it will result ' +
217 'in `undefined` being returned. If you need to access the same ' +
218 'value within the child component, you should pass it as a different ' +
219 - 'prop. (https://reactjs.org/link/special-props)',
219 + 'prop. (https://react.dev/link/special-props)',
220 );
221 });
222
@@ -241,7 +241,7 @@ describe('ReactJSXRuntime', () => {
241 'div: `key` is not a prop. Trying to access it will result ' +
242 'in `undefined` being returned. If you need to access the same ' +
243 'value within the child component, you should pass it as a different ' +
244 - 'prop. (https://reactjs.org/link/special-props)',
244 + 'prop. (https://react.dev/link/special-props)',
245 {withoutStack: true},
246 );
247 });
@@ -270,7 +270,7 @@ describe('ReactJSXRuntime', () => {
270 'Child: `ref` is not a prop. Trying to access it will result ' +
271 'in `undefined` being returned. If you need to access the same ' +
272 'value within the child component, you should pass it as a different ' +
273 - 'prop. (https://reactjs.org/link/special-props)',
273 + 'prop. (https://react.dev/link/special-props)',
274 );
275 });
276
@@ -300,7 +300,7 @@ describe('ReactJSXRuntime', () => {
300 });
301 }).toErrorDev(
302 'Warning: Each child in a list should have a unique "key" prop.\n\n' +
303 - 'Check the render method of `Parent`. See https://reactjs.org/link/warning-keys for more information.\n' +
303 + 'Check the render method of `Parent`. See https://react.dev/link/warning-keys for more information.\n' +
304 ' in Child (at **)\n' +
305 ' in Parent (at **)',
306 );
packages/react/src/__tests__/ReactStrictMode-test.js
+15 -15
@@ -624,18 +624,18 @@ describe('Concurrent Mode', () => {
624 ).toErrorDev(
625 [
626 /* eslint-disable max-len */
627 - `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.
627 + `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.
628
629 * Move code with side effects to componentDidMount, and set initial state in the constructor.
630
631 Please update the following components: App`,
632 - `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.
632 + `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.
633
634 * Move data fetching code or side effects to componentDidUpdate.
635 -* 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
635 +* 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
636
637 Please update the following components: Bar, Foo`,
638 - `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.
638 + `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.
639
640 * Move data fetching code or side effects to componentDidUpdate.
641
@@ -688,18 +688,18 @@ Please update the following components: App`,
688 ).toErrorDev(
689 [
690 /* eslint-disable max-len */
691 - `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.
691 + `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.
692
693 * Move code with side effects to componentDidMount, and set initial state in the constructor.
694
695 Please update the following components: App`,
696 - `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.
696 + `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.
697
698 * Move data fetching code or side effects to componentDidUpdate.
699 -* 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
699 +* 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
700
701 Please update the following components: Child`,
702 - `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.
702 + `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.
703
704 * Move data fetching code or side effects to componentDidUpdate.
705
@@ -711,20 +711,20 @@ Please update the following components: App`,
711 }).toWarnDev(
712 [
713 /* eslint-disable max-len */
714 - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
714 + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
715
716 * Move code with side effects to componentDidMount, and set initial state in the constructor.
717 * 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.
718
719 Please update the following components: Parent`,
720 - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
720 + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
721
722 * Move data fetching code or side effects to componentDidUpdate.
723 -* 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
723 +* 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
724 * 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.
725
726 Please update the following components: Parent`,
727 - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
727 + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
728
729 * Move data fetching code or side effects to componentDidUpdate.
730 * 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', () => {
998 'Warning: Component "StrictMode" contains the string ref "somestring". ' +
999 'Support for string refs will be removed in a future major release. ' +
1000 'We recommend using useRef() or createRef() instead. ' +
1001 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
1001 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
1002 ' in OuterComponent (at **)',
1003 );
1004
@@ -1037,7 +1037,7 @@ describe('string refs', () => {
1037 'Warning: Component "StrictMode" contains the string ref "somestring". ' +
1038 'Support for string refs will be removed in a future major release. ' +
1039 'We recommend using useRef() or createRef() instead. ' +
1040 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
1040 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
1041 ' in OuterComponent (at **)',
1042 );
1043
@@ -1126,7 +1126,7 @@ describe('context legacy', () => {
1126 '\n\nPlease update the following components: ' +
1127 'FunctionalLegacyContextConsumer, LegacyContextConsumer, LegacyContextProvider' +
1128 '\n\nLearn more about this warning here: ' +
1129 - 'https://reactjs.org/link/legacy-context' +
1129 + 'https://react.dev/link/legacy-context' +
1130 '\n in LegacyContextProvider (at **)' +
1131 '\n in div (at **)' +
1132 '\n in Root (at **)',
packages/react/src/__tests__/ReactTypeScriptClass-test.ts
+1 -1
@@ -698,7 +698,7 @@ describe('ReactTypeScriptClass', function() {
698 'Warning: Component "ClassicRefs" contains the string ref "inner". ' +
699 'Support for string refs will be removed in a future major release. ' +
700 'We recommend using useRef() or createRef() instead. ' +
701 - 'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
701 + 'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
702 ' in ClassicRefs (at **)',
703 ]);
704 expect(ref.current.refs.inner.getName()).toBe('foo');
packages/react/src/__tests__/createReactClassIntegration-test.js
+2 -2
@@ -608,7 +608,7 @@ describe('create-react-class-integration', () => {
608 ' componentWillReceiveProps\n' +
609 ' componentWillUpdate\n\n' +
610 'The above lifecycles should be removed. Learn more about this warning here:\n' +
611 - 'https://reactjs.org/link/unsafe-component-lifecycles',
611 + 'https://react.dev/link/unsafe-component-lifecycles',
612 );
613 }).toWarnDev(
614 [
@@ -657,7 +657,7 @@ describe('create-react-class-integration', () => {
657 ' componentWillReceiveProps\n' +
658 ' componentWillUpdate\n\n' +
659 'The above lifecycles should be removed. Learn more about this warning here:\n' +
660 - 'https://reactjs.org/link/unsafe-component-lifecycles',
660 + 'https://react.dev/link/unsafe-component-lifecycles',
661 );
662 }).toWarnDev(
663 [
packages/react/src/__tests__/forwardRef-test.js
+5 -5
@@ -192,7 +192,7 @@ describe('forwardRef', () => {
192 await expect(async () => {
193 await waitForAll([]);
194 }).toErrorDev(
195 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
195 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
196 ' in p (at **)',
197 );
198 });
@@ -209,7 +209,7 @@ describe('forwardRef', () => {
209 await expect(async () => {
210 await waitForAll([]);
211 }).toErrorDev(
212 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
212 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
213 ' in Inner (at **)\n' +
214 ' in p (at **)',
215 );
@@ -229,7 +229,7 @@ describe('forwardRef', () => {
229 await expect(async () => {
230 await waitForAll([]);
231 }).toErrorDev(
232 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
232 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
233 ' in Inner (at **)\n' +
234 ' in p (at **)',
235 );
@@ -248,7 +248,7 @@ describe('forwardRef', () => {
248 await expect(async () => {
249 await waitForAll([]);
250 }).toErrorDev(
251 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
251 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
252 ' in Outer (at **)\n' +
253 ' in p (at **)',
254 );
@@ -269,7 +269,7 @@ describe('forwardRef', () => {
269 await expect(async () => {
270 await waitForAll([]);
271 }).toErrorDev(
272 - 'Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
272 + 'Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.\n' +
273 ' in Inner (at **)\n' +
274 ' in p (at **)',
275 );
packages/react/src/jsx/ReactJSXElement.js
+4 -4
@@ -79,7 +79,7 @@ function warnIfStringRefCannotBeAutoConverted(config, self) {
79 'This case cannot be automatically converted to an arrow function. ' +
80 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +
81 'Learn more about using refs safely here: ' +
82 - 'https://reactjs.org/link/strict-mode-string-ref',
82 + 'https://react.dev/link/strict-mode-string-ref',
83 getComponentNameFromType(ReactCurrentOwner.current.type),
84 config.ref,
85 );
@@ -98,7 +98,7 @@ function defineKeyPropWarningGetter(props, displayName) {
98 '%s: `key` is not a prop. Trying to access it will result ' +
99 'in `undefined` being returned. If you need to access the same ' +
100 'value within the child component, you should pass it as a different ' +
101 - 'prop. (https://reactjs.org/link/special-props)',
101 + 'prop. (https://react.dev/link/special-props)',
102 displayName,
103 );
104 }
@@ -121,7 +121,7 @@ function defineRefPropWarningGetter(props, displayName) {
121 '%s: `ref` is not a prop. Trying to access it will result ' +
122 'in `undefined` being returned. If you need to access the same ' +
123 'value within the child component, you should pass it as a different ' +
124 - 'prop. (https://reactjs.org/link/special-props)',
124 + 'prop. (https://react.dev/link/special-props)',
125 displayName,
126 );
127 }
@@ -1034,7 +1034,7 @@ function validateExplicitKey(element, parentType) {
1034 setCurrentlyValidatingElement(element);
1035 console.error(
1036 'Each child in a list should have a unique "key" prop.' +
1037 - '%s%s See https://reactjs.org/link/warning-keys for more information.',
1037 + '%s%s See https://react.dev/link/warning-keys for more information.',
1038 currentComponentErrorInfo,
1039 childOwner,
1040 );
packages/shared/invokeGuardedCallbackImpl.js
+1 -1
@@ -172,7 +172,7 @@ export default function invokeGuardedCallbackImpl<Args: Array<mixed>, Context>(
172 error = new Error(
173 "A cross-origin error was thrown. React doesn't have access to " +
174 'the actual error object in development. ' +
175 - 'See https://reactjs.org/link/crossorigin-error for more information.',
175 + 'See https://react.dev/link/crossorigin-error for more information.',
176 );
177 }
178 this.onError(error);
scripts/error-codes/codes.json
+13 -13
@@ -60,7 +60,7 @@
60 "58": "Cannot replace markup of the <html> 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().",
61 "59": "%s is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`.",
62 "60": "Can only set one of `children` or `props.dangerouslySetInnerHTML`.",
63 - "61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.",
63 + "61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.",
64 "62": "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.",
65 "63": "Must be mounted to trap events",
66 "64": "Requires node to be rendered.",
@@ -118,8 +118,8 @@
118 "116": "traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",
119 "117": "traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s",
120 "118": "updateTextContent called on non-empty component.",
121 - "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).",
122 - "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).",
121 + "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).",
122 + "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).",
123 "121": "performUpdateIfNecessary: Unexpected batch number (current %s, pending %s)",
124 "122": "%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",
125 "123": "ReactUpdates: must inject a reconcile transaction class and batching strategy",
@@ -148,7 +148,7 @@
148 "146": "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.",
149 "147": "Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.",
150 "148": "Expected ref to be a function or a string.",
151 - "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).",
151 + "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).",
152 "150": "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.",
153 "151": "An iterable object provided no iterator.",
154 "152": "Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.",
@@ -252,7 +252,7 @@
252 "251": "batch.commit: Cannot commit a batch multiple times.",
253 "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.",
254 "253": "work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.",
255 - "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.",
255 + "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.",
256 "255": "Expected ReactFbErrorUtils.invokeGuardedCallback to be a function.",
257 "257": "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.",
258 "258": "Unknown element-like object type: %s. This is likely a bug in React. Please file an issue.",
@@ -272,7 +272,7 @@
272 "273": "Nesting of <View> within <Text> is not currently supported.",
273 "274": "Text strings must be rendered within a <Text> component.",
274 "275": "The current renderer does not support mutation. This error is likely caused by a bug in React. Please file an issue.",
275 - "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills",
275 + "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills",
276 "277": "Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.",
277 "278": "unstable_createRoot(...): Target container is not a DOM element.",
278 "279": "Trying to release an event instance into a pool of a different type.",
@@ -283,10 +283,10 @@
283 "284": "Expected ref to be a function, an object returned by React.createRef(), or undefined/null.",
284 "285": "The root failed to unmount after an error. This is likely a bug in React. Please file an issue.",
285 "286": "%s(...): the first argument must be a React class instance. Instead received: %s.",
286 - "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",
287 - "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",
286 + "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",
287 + "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",
288 "289": "Function components cannot have refs.",
289 - "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.",
289 + "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.",
290 "292": "The matcher `toHaveYielded` expects an instance of React Test Renderer.\n\nTry: expect(Scheduler).toHaveYielded(expectedYields)",
291 "293": "Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.",
292 "294": "ReactDOMServer does not yet support Suspense.",
@@ -296,14 +296,14 @@
296 "299": "Target container is not a DOM element.",
297 "300": "Rendered fewer hooks than expected. This may be caused by an accidental early return statement.",
298 "301": "Too many re-renders. React limits the number of renders to prevent an infinite loop.",
299 - "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",
299 + "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",
300 "303": "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.",
301 "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.",
302 "305": "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.",
303 "306": "Element type is invalid. Received a promise that resolves to: %s. Lazy element type must resolve to a class or function.%s",
304 - "307": "Hooks can only be called inside the body of a function component. (https://reactjs.org/link/invalid-hook-call)",
304 + "307": "Hooks can only be called inside the body of a function component. (https://react.dev/link/invalid-hook-call)",
305 "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().",
306 - "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",
306 + "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",
307 "310": "Rendered more hooks than during the previous render.",
308 "311": "Should have a queue. This is likely a bug in React. Please file an issue.",
309 "312": "Rendered more hooks than during the previous render",
@@ -315,7 +315,7 @@
315 "318": "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.",
316 "319": "A dehydrated suspense boundary must commit before trying to render. This is probably a bug in React.",
317 "320": "Expected ReactFiberErrorDialog.showErrorDialog to be a function.",
318 - "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.",
318 + "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.",
319 "322": "forwardRef requires a render function but was given %s.",
320 "323": "React has blocked a javascript: URL as a security precaution.",
321 "326": "Expected a valid priority level",