@samitouri / QOS-React-2 / commits / 702fad4b1b

refactor fb.me redirect link to reactjs.org/link (#19598)

* refactor fb.me url to reactjs.org/link * Update ESLintRuleExhaustiveDeps-test.js * Update ReactDOMServerIntegrationUntrustedURL-test.internal.js * Update createReactClassIntegration-test.js * Update ReactDOMServerIntegrationUntrustedURL-test.internal.js Co-authored-by: Dan Abramov <dan.abramov@gmail.com>

CY Lim committed Aug 17, 2020 at 20:25 UTC 702fad4b1b48ac8f626ed3f35e8f86f5ea728084
75 files changed +226 -226
packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js
+2 -2
@@ -6633,7 +6633,7 @@ const tests = {
6633 ' }\n' +
6634 ' fetchData();\n' +
6635 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6636 - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching',
6636 + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
6637 suggestions: undefined,
6638 },
6639 ],
@@ -6657,7 +6657,7 @@ const tests = {
6657 ' }\n' +
6658 ' fetchData();\n' +
6659 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6660 - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching',
6660 + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
6661 suggestions: undefined,
6662 },
6663 ],
packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
+1 -1
@@ -258,7 +258,7 @@ export default {
258 ' }\n' +
259 ' fetchData();\n' +
260 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
261 - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching',
261 + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
262 });
263 }
264
packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js
+1 -1
@@ -284,7 +284,7 @@ describe('ReactHooksInspection', () => {
284 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
285 '2. You might be breaking the Rules of Hooks\n' +
286 '3. You might have more than one copy of React in the same app\n' +
287 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
287 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
288 );
289
290 expect(getterCalls).toBe(1);
packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js
+1 -1
@@ -787,7 +787,7 @@ describe('ReactHooksInspectionIntegration', () => {
787 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
788 '2. You might be breaking the Rules of Hooks\n' +
789 '3. You might have more than one copy of React in the same app\n' +
790 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
790 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
791 );
792
793 expect(getterCalls).toBe(1);
packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js
+1 -1
@@ -24,7 +24,7 @@ export default function NoInteractions({
24 <p>
25 <a
26 className={styles.Link}
27 - href="http://fb.me/react-interaction-tracing"
27 + href="https://reactjs.org/link/interaction-tracing"
28 rel="noopener noreferrer"
29 target="_blank">
30 Learn more about the interaction tracing API here.
packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js
+2 -2
@@ -176,10 +176,10 @@ const ProfilingNotSupported = () => (
176 Learn more at{' '}
177 <a
178 className={styles.Link}
179 - href="https://fb.me/react-profiling"
179 + href="https://reactjs.org/link/profiling"
180 rel="noopener noreferrer"
181 target="_blank">
182 - fb.me/react-profiling
182 + reactjs.org/link/profiling
183 </a>
184 .
185 </p>
packages/react-devtools-shared/src/hook.js
+1 -1
@@ -145,7 +145,7 @@ export function installHook(target: any): DevToolsHook | null {
145 'React is running in production mode, but dead code ' +
146 'elimination has not been applied. Read how to correctly ' +
147 'configure React for production: ' +
148 - 'https://fb.me/react-perf-use-the-production-build',
148 + 'https://reactjs.org/link/perf-use-production-build',
149 );
150 });
151 }
packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js
+12 -12
@@ -801,7 +801,7 @@ describe('ReactComponentLifeCycle', () => {
801 ' UNSAFE_componentWillReceiveProps\n' +
802 ' componentWillUpdate\n\n' +
803 'The above lifecycles should be removed. Learn more about this warning here:\n' +
804 - 'https://fb.me/react-unsafe-component-lifecycles',
804 + 'https://reactjs.org/link/unsafe-component-lifecycles',
805 );
806 }).toWarnDev(
807 [
@@ -827,7 +827,7 @@ describe('ReactComponentLifeCycle', () => {
827 'WillMount uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
828 ' UNSAFE_componentWillMount\n\n' +
829 'The above lifecycles should be removed. Learn more about this warning here:\n' +
830 - 'https://fb.me/react-unsafe-component-lifecycles',
830 + 'https://reactjs.org/link/unsafe-component-lifecycles',
831 );
832
833 class WillMountAndUpdate extends React.Component {
@@ -851,7 +851,7 @@ describe('ReactComponentLifeCycle', () => {
851 ' componentWillMount\n' +
852 ' UNSAFE_componentWillUpdate\n\n' +
853 'The above lifecycles should be removed. Learn more about this warning here:\n' +
854 - 'https://fb.me/react-unsafe-component-lifecycles',
854 + 'https://reactjs.org/link/unsafe-component-lifecycles',
855 );
856 }).toWarnDev(['componentWillMount has been renamed'], {
857 withoutStack: true,
@@ -874,7 +874,7 @@ describe('ReactComponentLifeCycle', () => {
874 'WillReceiveProps uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
875 ' componentWillReceiveProps\n\n' +
876 'The above lifecycles should be removed. Learn more about this warning here:\n' +
877 - 'https://fb.me/react-unsafe-component-lifecycles',
877 + 'https://reactjs.org/link/unsafe-component-lifecycles',
878 );
879 }).toWarnDev(['componentWillReceiveProps has been renamed'], {
880 withoutStack: true,
@@ -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://fb.me/react-unsafe-component-lifecycles',
909 + 'https://reactjs.org/link/unsafe-component-lifecycles',
910 );
911 }).toWarnDev(
912 [
@@ -931,7 +931,7 @@ describe('ReactComponentLifeCycle', () => {
931 'WillMount uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
932 ' UNSAFE_componentWillMount\n\n' +
933 'The above lifecycles should be removed. Learn more about this warning here:\n' +
934 - 'https://fb.me/react-unsafe-component-lifecycles',
934 + 'https://reactjs.org/link/unsafe-component-lifecycles',
935 );
936
937 class WillMountAndUpdate extends React.Component {
@@ -954,7 +954,7 @@ describe('ReactComponentLifeCycle', () => {
954 ' componentWillMount\n' +
955 ' UNSAFE_componentWillUpdate\n\n' +
956 'The above lifecycles should be removed. Learn more about this warning here:\n' +
957 - 'https://fb.me/react-unsafe-component-lifecycles',
957 + 'https://reactjs.org/link/unsafe-component-lifecycles',
958 );
959 }).toWarnDev(['componentWillMount has been renamed'], {
960 withoutStack: true,
@@ -976,7 +976,7 @@ describe('ReactComponentLifeCycle', () => {
976 'WillReceiveProps uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
977 ' componentWillReceiveProps\n\n' +
978 'The above lifecycles should be removed. Learn more about this warning here:\n' +
979 - 'https://fb.me/react-unsafe-component-lifecycles',
979 + 'https://reactjs.org/link/unsafe-component-lifecycles',
980 );
981 }).toWarnDev(['componentWillReceiveProps has been renamed'], {
982 withoutStack: true,
@@ -1383,20 +1383,20 @@ describe('ReactComponentLifeCycle', () => {
1383 expect(() => ReactDOM.render(<MyComponent x={1} />, container)).toWarnDev(
1384 [
1385 /* eslint-disable max-len */
1386 - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
1386 + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1387
1388 * Move code with side effects to componentDidMount, and set initial state in the constructor.
1389 * 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.
1390
1391 Please update the following components: MyComponent`,
1392 - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
1392 + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1393
1394 * Move data fetching code or side effects to componentDidUpdate.
1395 -* 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://fb.me/react-derived-state
1395 +* 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
1396 * 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.
1397
1398 Please update the following components: MyComponent`,
1399 - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
1399 + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1400
1401 * Move data fetching code or side effects to componentDidUpdate.
1402 * 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
@@ -93,7 +93,7 @@ describe('ReactDOM unknown attribute', () => {
93 expect(() => testUnknownAttributeRemoval(Symbol('foo'))).toErrorDev(
94 'Warning: Invalid value for prop `unknown` on <div> tag. Either remove it ' +
95 'from the element, or pass a string or number value to keep it ' +
96 - 'in the DOM. For details, see https://fb.me/react-attribute-behavior\n' +
96 + 'in the DOM. For details, see https://reactjs.org/link/attribute-behavior \n' +
97 ' in div (at **)',
98 );
99 });
@@ -105,7 +105,7 @@ describe('ReactDOM unknown attribute', () => {
105 'Warning: Invalid value for prop `unknown` on <div> tag. Either remove ' +
106 'it from the element, or pass a string or number value to ' +
107 'keep it in the DOM. For details, see ' +
108 - 'https://fb.me/react-attribute-behavior\n' +
108 + 'https://reactjs.org/link/attribute-behavior \n' +
109 ' in div (at **)',
110 );
111 });
packages/react-dom/src/__tests__/ReactDOMComponent-test.js
+4 -4
@@ -150,7 +150,7 @@ describe('ReactDOMComponent', () => {
150 ).toErrorDev(
151 'Warning: Invalid value for prop `foo` on <div> tag. Either remove it ' +
152 'from the element, or pass a string or number value to keep ' +
153 - 'it in the DOM. For details, see https://fb.me/react-attribute-behavior' +
153 + 'it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' +
154 '\n in div (at **)',
155 );
156 });
@@ -162,7 +162,7 @@ describe('ReactDOMComponent', () => {
162 ).toErrorDev(
163 'Warning: Invalid values for props `foo`, `baz` on <div> tag. Either remove ' +
164 'them from the element, or pass a string or number value to keep ' +
165 - 'them in the DOM. For details, see https://fb.me/react-attribute-behavior' +
165 + 'them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' +
166 '\n in div (at **)',
167 );
168 });
@@ -1384,7 +1384,7 @@ describe('ReactDOMComponent', () => {
1384 mountComponent({dangerouslySetInnerHTML: '<span>Hi Jim!</span>'});
1385 }).toThrowError(
1386 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1387 - 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.',
1387 + 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.',
1388 );
1389 });
1390
@@ -1393,7 +1393,7 @@ describe('ReactDOMComponent', () => {
1393 mountComponent({dangerouslySetInnerHTML: {foo: 'bar'}});
1394 }).toThrowError(
1395 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1396 - 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.',
1396 + 'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.',
1397 );
1398 });
1399
packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js
+1 -1
@@ -183,7 +183,7 @@ describe('ReactDOMComponentTree', () => {
183 'a defined value, which should not happen. ' +
184 'Decide between using a controlled or uncontrolled input ' +
185 'element for the lifetime of the component. More info: ' +
186 - 'https://fb.me/react-controlled-components',
186 + 'https://reactjs.org/link/controlled-components',
187 );
188 });
189
packages/react-dom/src/__tests__/ReactDOMInput-test.js
+18 -18
@@ -1228,7 +1228,7 @@ describe('ReactDOMInput', () => {
1228 '(specify either the checked prop, or the defaultChecked prop, but not ' +
1229 'both). Decide between using a controlled or uncontrolled input ' +
1230 'element and remove one of these props. More info: ' +
1231 - 'https://fb.me/react-controlled-components',
1231 + 'https://reactjs.org/link/controlled-components',
1232 );
1233 ReactDOM.unmountComponentAtNode(container);
1234
@@ -1255,7 +1255,7 @@ describe('ReactDOMInput', () => {
1255 '(specify either the value prop, or the defaultValue prop, but not ' +
1256 'both). Decide between using a controlled or uncontrolled input ' +
1257 'element and remove one of these props. More info: ' +
1258 - 'https://fb.me/react-controlled-components',
1258 + 'https://reactjs.org/link/controlled-components',
1259 );
1260 ReactDOM.unmountComponentAtNode(container);
1261
@@ -1275,7 +1275,7 @@ describe('ReactDOMInput', () => {
1275 'This is likely caused by the value changing from a defined to ' +
1276 'undefined, which should not happen. ' +
1277 'Decide between using a controlled or uncontrolled input ' +
1278 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1278 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1279 ' in input (at **)',
1280 );
1281 });
@@ -1294,7 +1294,7 @@ describe('ReactDOMInput', () => {
1294 'This is likely caused by the value changing from a defined to ' +
1295 'undefined, which should not happen. ' +
1296 'Decide between using a controlled or uncontrolled input ' +
1297 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1297 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1298 ' in input (at **)',
1299 ]);
1300 });
@@ -1314,7 +1314,7 @@ describe('ReactDOMInput', () => {
1314 'This is likely caused by the value changing from a defined to ' +
1315 'undefined, which should not happen. ' +
1316 'Decide between using a controlled or uncontrolled input ' +
1317 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1317 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1318 ' in input (at **)',
1319 );
1320 });
@@ -1329,7 +1329,7 @@ describe('ReactDOMInput', () => {
1329 'This is likely caused by the value changing from undefined to ' +
1330 'a defined value, which should not happen. ' +
1331 'Decide between using a controlled or uncontrolled input ' +
1332 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1332 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1333 ' in input (at **)',
1334 );
1335 });
@@ -1347,7 +1347,7 @@ describe('ReactDOMInput', () => {
1347 'This is likely caused by the value changing from undefined to ' +
1348 'a defined value, which should not happen. ' +
1349 'Decide between using a controlled or uncontrolled input ' +
1350 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1350 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1351 ' in input (at **)',
1352 );
1353 });
@@ -1364,7 +1364,7 @@ describe('ReactDOMInput', () => {
1364 'This is likely caused by the value changing from a defined to ' +
1365 'undefined, which should not happen. ' +
1366 'Decide between using a controlled or uncontrolled input ' +
1367 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1367 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1368 ' in input (at **)',
1369 );
1370 });
@@ -1381,7 +1381,7 @@ describe('ReactDOMInput', () => {
1381 'This is likely caused by the value changing from a defined to ' +
1382 'undefined, which should not happen. ' +
1383 'Decide between using a controlled or uncontrolled input ' +
1384 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1384 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1385 ' in input (at **)',
1386 );
1387 });
@@ -1401,7 +1401,7 @@ describe('ReactDOMInput', () => {
1401 'This is likely caused by the value changing from a defined to ' +
1402 'undefined, which should not happen. ' +
1403 'Decide between using a controlled or uncontrolled input ' +
1404 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1404 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1405 ' in input (at **)',
1406 );
1407 });
@@ -1416,7 +1416,7 @@ describe('ReactDOMInput', () => {
1416 'This is likely caused by the value changing from undefined to ' +
1417 'a defined value, which should not happen. ' +
1418 'Decide between using a controlled or uncontrolled input ' +
1419 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1419 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1420 ' in input (at **)',
1421 );
1422 });
@@ -1431,7 +1431,7 @@ describe('ReactDOMInput', () => {
1431 'This is likely caused by the value changing from undefined to ' +
1432 'a defined value, which should not happen. ' +
1433 'Decide between using a controlled or uncontrolled input ' +
1434 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1434 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1435 ' in input (at **)',
1436 );
1437 });
@@ -1444,7 +1444,7 @@ describe('ReactDOMInput', () => {
1444 'This is likely caused by the value changing from a defined to ' +
1445 'undefined, which should not happen. ' +
1446 'Decide between using a controlled or uncontrolled input ' +
1447 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1447 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1448 ' in input (at **)',
1449 );
1450 });
@@ -1459,7 +1459,7 @@ describe('ReactDOMInput', () => {
1459 'This is likely caused by the value changing from a defined to ' +
1460 'undefined, which should not happen. ' +
1461 'Decide between using a controlled or uncontrolled input ' +
1462 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1462 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1463 ' in input (at **)',
1464 );
1465 });
@@ -1474,7 +1474,7 @@ describe('ReactDOMInput', () => {
1474 'This is likely caused by the value changing from a defined to ' +
1475 'undefined, which should not happen. ' +
1476 'Decide between using a controlled or uncontrolled input ' +
1477 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1477 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1478 ' in input (at **)',
1479 );
1480 });
@@ -1489,7 +1489,7 @@ describe('ReactDOMInput', () => {
1489 'This is likely caused by the value changing from undefined to ' +
1490 'a defined value, which should not happen. ' +
1491 'Decide between using a controlled or uncontrolled input ' +
1492 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1492 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1493 ' in input (at **)',
1494 );
1495 });
@@ -1504,7 +1504,7 @@ describe('ReactDOMInput', () => {
1504 'This is likely caused by the value changing from undefined to ' +
1505 'a defined value, which should not happen. ' +
1506 'Decide between using a controlled or uncontrolled input ' +
1507 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1507 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1508 ' in input (at **)',
1509 );
1510 });
@@ -1557,7 +1557,7 @@ describe('ReactDOMInput', () => {
1557 'This is likely caused by the value changing from a defined to ' +
1558 'undefined, which should not happen. ' +
1559 'Decide between using a controlled or uncontrolled input ' +
1560 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
1560 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\n' +
1561 ' in input (at **)',
1562 );
1563 });
packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js
+2 -2
@@ -31,7 +31,7 @@ describe('ReactDOMInvalidARIAHook', () => {
31 it('should warn for one invalid aria-* prop', () => {
32 expect(() => mountComponent({'aria-badprop': 'maybe'})).toErrorDev(
33 'Warning: Invalid aria prop `aria-badprop` on <div> tag. ' +
34 - 'For details, see https://fb.me/invalid-aria-prop',
34 + 'For details, see https://reactjs.org/link/invalid-aria-props',
35 );
36 });
37 it('should warn for many invalid aria-* props', () => {
@@ -42,7 +42,7 @@ describe('ReactDOMInvalidARIAHook', () => {
42 }),
43 ).toErrorDev(
44 'Warning: Invalid aria props `aria-badprop`, `aria-malprop` on <div> ' +
45 - 'tag. For details, see https://fb.me/invalid-aria-prop',
45 + 'tag. For details, see https://reactjs.org/link/invalid-aria-props',
46 );
47 });
48 it('should warn for an improperly cased aria-* prop', () => {
packages/react-dom/src/__tests__/ReactDOMSelect-test.js
+1 -1
@@ -693,7 +693,7 @@ describe('ReactDOMSelect', () => {
693 '(specify either the value prop, or the defaultValue prop, but not ' +
694 'both). Decide between using a controlled or uncontrolled select ' +
695 'element and remove one of these props. More info: ' +
696 - 'https://fb.me/react-controlled-components',
696 + 'https://reactjs.org/link/controlled-components',
697 );
698
699 ReactTestUtils.renderIntoDocument(
packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
+2 -2
@@ -156,7 +156,7 @@ describe('ReactDOMServerHooks', () => {
156 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
157 '2. You might be breaking the Rules of Hooks\n' +
158 '3. You might have more than one copy of React in the same app\n' +
159 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
159 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
160 );
161
162 itRenders('multiple times when an updater is called', async render => {
@@ -674,7 +674,7 @@ describe('ReactDOMServerHooks', () => {
674 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
675 '2. You might be breaking the Rules of Hooks\n' +
676 '3. You might have more than one copy of React in the same app\n' +
677 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
677 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
678 );
679 });
680
packages/react-dom/src/__tests__/ReactDOMServerIntegrationUntrustedURL-test.internal.js
+2 -2
@@ -250,7 +250,7 @@ describe('ReactDOMServerIntegration - Untrusted URLs - disableJavaScriptURLs', (
250 // the first times it is called and then becomes dangerous.
251 toStringCalls++;
252 if (toStringCalls <= expectedToStringCalls) {
253 - return 'https://fb.me/';
253 + return 'https://reactjs.org/';
254 }
255 return 'javascript:notfine';
256 },
@@ -258,7 +258,7 @@ describe('ReactDOMServerIntegration - Untrusted URLs - disableJavaScriptURLs', (
258
259 const e = await render(<a href={firstIsSafe} />);
260 expect(toStringCalls).toBe(expectedToStringCalls);
261 - expect(e.href).toBe('https://fb.me/');
261 + expect(e.href).toBe('https://reactjs.org/');
262 });
263
264 it('rejects a javascript protocol href if it is added during an update twice', () => {
packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js
+1 -1
@@ -293,7 +293,7 @@ describe('ReactDOMServerLifecycles', () => {
293 }
294
295 expect(() => ReactDOMServer.renderToString(<MyComponent />)).toWarnDev(
296 - 'componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
296 + 'componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
297 '* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\n\n' +
298 'Please update the following components: MyComponent',
299 );
packages/react-dom/src/__tests__/ReactDOMTextarea-test.js
+1 -1
@@ -525,7 +525,7 @@ describe('ReactDOMTextarea', () => {
525 '(specify either the value prop, or the defaultValue prop, but not ' +
526 'both). Decide between using a controlled or uncontrolled textarea ' +
527 'and remove one of these props. More info: ' +
528 - 'https://fb.me/react-controlled-components',
528 + 'https://reactjs.org/link/controlled-components',
529 );
530
531 // No additional warnings are expected
packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.internal.js
+3 -3
@@ -69,7 +69,7 @@ describe('ReactDeprecationWarnings', () => {
69 'Support for string refs will be removed in a future major release. ' +
70 'We recommend using useRef() or createRef() instead. ' +
71 'Learn more about using refs safely here: ' +
72 - 'https://fb.me/react-strict-mode-string-ref' +
72 + 'https://reactjs.org/link/strict-mode-string-ref' +
73 '\n in Component (at **)',
74 );
75 });
@@ -110,7 +110,7 @@ describe('ReactDeprecationWarnings', () => {
110 'This case cannot be automatically converted to an arrow function. ' +
111 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +
112 'Learn more about using refs safely here: ' +
113 - 'https://fb.me/react-strict-mode-string-ref',
113 + 'https://reactjs.org/link/strict-mode-string-ref',
114 ]);
115 });
116
@@ -141,7 +141,7 @@ describe('ReactDeprecationWarnings', () => {
141 'This case cannot be automatically converted to an arrow function. ' +
142 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +
143 'Learn more about using refs safely here: ' +
144 - 'https://fb.me/react-strict-mode-string-ref',
144 + 'https://reactjs.org/link/strict-mode-string-ref',
145 );
146 });
147 }
packages/react-dom/src/__tests__/ReactFunctionComponent-test.js
+1 -1
@@ -167,7 +167,7 @@ describe('ReactFunctionComponent', () => {
167 '1. You may be adding a ref to a function component\n' +
168 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
169 '3. You have multiple copies of React loaded\n' +
170 - 'See https://fb.me/react-refs-must-have-owner for more information.',
170 + 'See https://reactjs.org/link/refs-must-have-owner for more information.',
171 );
172 });
173
packages/react-dom/src/__tests__/ReactTestUtils-test.js
+1 -1
@@ -46,7 +46,7 @@ describe('ReactTestUtils', () => {
46 ).toWarnDev(
47 'ReactTestUtils.mockComponent() is deprecated. ' +
48 'Use shallow rendering or jest.mock() instead.\n\n' +
49 - 'See https://fb.me/test-utils-mock-component for more information.',
49 + 'See https://reactjs.org/link/test-utils-mock-component for more information.',
50 {withoutStack: true},
51 );
52
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://fb.me/react-strict-mode-find-node' +
125 + 'https://reactjs.org/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://fb.me/react-strict-mode-find-node' +
154 + 'https://reactjs.org/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
@@ -30,7 +30,7 @@ describe('when different React version is used with string ref', () => {
30 '1. You may be adding a ref to a function component\n' +
31 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
32 '3. You have multiple copies of React loaded\n' +
33 - 'See https://fb.me/react-refs-must-have-owner for more information.',
33 + 'See https://reactjs.org/link/refs-must-have-owner for more information.',
34 );
35 });
36 });
packages/react-dom/src/__tests__/refs-test.js
+1 -1
@@ -458,7 +458,7 @@ describe('creating element with ref in constructor', () => {
458 '1. You may be adding a ref to a function component\n' +
459 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
460 '3. You have multiple copies of React loaded\n' +
461 - 'See https://fb.me/react-refs-must-have-owner for more information.',
461 + 'See https://reactjs.org/link/refs-must-have-owner for more information.',
462 );
463 });
464 });
packages/react-dom/src/client/ReactDOM.js
+3 -3
@@ -94,7 +94,7 @@ if (__DEV__) {
94 ) {
95 console.error(
96 'React depends on Map and Set built-in types. Make sure that you load a ' +
97 - 'polyfill in older browsers. https://fb.me/react-polyfills',
97 + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills',
98 );
99 }
100 }
@@ -238,10 +238,10 @@ if (__DEV__) {
238 console.info(
239 '%cDownload the React DevTools ' +
240 'for a better development experience: ' +
241 - 'https://fb.me/react-devtools' +
241 + 'https://reactjs.org/link/react-devtools' +
242 (protocol === 'file:'
243 ? '\nYou might need to use a local HTTP server (instead of file://): ' +
244 - 'https://fb.me/react-devtools-faq'
244 + 'https://reactjs.org/link/react-devtools-faq'
245 : ''),
246 'font-weight:bold',
247 );
packages/react-dom/src/client/ReactDOMInput.js
+4 -4
@@ -86,7 +86,7 @@ export function initWrapperState(element: Element, props: Object) {
86 '(specify either the checked prop, or the defaultChecked prop, but not ' +
87 'both). Decide between using a controlled or uncontrolled input ' +
88 'element and remove one of these props. More info: ' +
89 - 'https://fb.me/react-controlled-components',
89 + 'https://reactjs.org/link/controlled-components',
90 getCurrentFiberOwnerNameInDevOrNull() || 'A component',
91 props.type,
92 );
@@ -103,7 +103,7 @@ export function initWrapperState(element: Element, props: Object) {
103 '(specify either the value prop, or the defaultValue prop, but not ' +
104 'both). Decide between using a controlled or uncontrolled input ' +
105 'element and remove one of these props. More info: ' +
106 - 'https://fb.me/react-controlled-components',
106 + 'https://reactjs.org/link/controlled-components',
107 getCurrentFiberOwnerNameInDevOrNull() || 'A component',
108 props.type,
109 );
@@ -147,7 +147,7 @@ export function updateWrapper(element: Element, props: Object) {
147 'This is likely caused by the value changing from undefined to ' +
148 'a defined value, which should not happen. ' +
149 'Decide between using a controlled or uncontrolled input ' +
150 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components',
150 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components',
151 );
152 didWarnUncontrolledToControlled = true;
153 }
@@ -161,7 +161,7 @@ export function updateWrapper(element: Element, props: Object) {
161 'This is likely caused by the value changing from a defined to ' +
162 'undefined, which should not happen. ' +
163 'Decide between using a controlled or uncontrolled input ' +
164 - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components',
164 + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components',
165 );
166 didWarnControlledToUncontrolled = true;
167 }
packages/react-dom/src/client/ReactDOMSelect.js
+1 -1
@@ -159,7 +159,7 @@ export function initWrapperState(element: Element, props: Object) {
159 '(specify either the value prop, or the defaultValue prop, but not ' +
160 'both). Decide between using a controlled or uncontrolled select ' +
161 'element and remove one of these props. More info: ' +
162 - 'https://fb.me/react-controlled-components',
162 + 'https://reactjs.org/link/controlled-components',
163 );
164 didWarnValueDefaultValue = true;
165 }
packages/react-dom/src/client/ReactDOMTextarea.js
+1 -1
@@ -76,7 +76,7 @@ export function initWrapperState(element: Element, props: Object) {
76 '(specify either the value prop, or the defaultValue prop, but not ' +
77 'both). Decide between using a controlled or uncontrolled textarea ' +
78 'and remove one of these props. More info: ' +
79 - 'https://fb.me/react-controlled-components',
79 + 'https://reactjs.org/link/controlled-components',
80 getCurrentFiberOwnerNameInDevOrNull() || 'A component',
81 );
82 didWarnValDefaultVal = true;
packages/react-dom/src/server/ReactPartialRenderer.js
+5 -5
@@ -591,7 +591,7 @@ function resolve(
591 console.warn(
592 // keep this warning in sync with ReactStrictModeWarning.js
593 'componentWillMount has been renamed, and is not recommended for use. ' +
594 - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
594 + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' +
595 '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' +
596 'or the constructor.\n' +
597 '\nPlease update the following components: %s',
@@ -1398,7 +1398,7 @@ class ReactDOMServerRenderer {
1398 '(specify either the checked prop, or the defaultChecked prop, but not ' +
1399 'both). Decide between using a controlled or uncontrolled input ' +
1400 'element and remove one of these props. More info: ' +
1401 - 'https://fb.me/react-controlled-components',
1401 + 'https://reactjs.org/link/controlled-components',
1402 'A component',
1403 props.type,
1404 );
@@ -1415,7 +1415,7 @@ class ReactDOMServerRenderer {
1415 '(specify either the value prop, or the defaultValue prop, but not ' +
1416 'both). Decide between using a controlled or uncontrolled input ' +
1417 'element and remove one of these props. More info: ' +
1418 - 'https://fb.me/react-controlled-components',
1418 + 'https://reactjs.org/link/controlled-components',
1419 'A component',
1420 props.type,
1421 );
@@ -1448,7 +1448,7 @@ class ReactDOMServerRenderer {
1448 '(specify either the value prop, or the defaultValue prop, but not ' +
1449 'both). Decide between using a controlled or uncontrolled textarea ' +
1450 'and remove one of these props. More info: ' +
1451 - 'https://fb.me/react-controlled-components',
1451 + 'https://reactjs.org/link/controlled-components',
1452 );
1453 didWarnDefaultTextareaValue = true;
1454 }
@@ -1525,7 +1525,7 @@ class ReactDOMServerRenderer {
1525 '(specify either the value prop, or the defaultValue prop, but not ' +
1526 'both). Decide between using a controlled or uncontrolled select ' +
1527 'element and remove one of these props. More info: ' +
1528 - 'https://fb.me/react-controlled-components',
1528 + 'https://reactjs.org/link/controlled-components',
1529 );
1530 didWarnDefaultSelectValue = true;
1531 }
packages/react-dom/src/server/ReactPartialRendererHooks.js
+3 -3
@@ -74,7 +74,7 @@ function resolveCurrentlyRenderingComponent(): Object {
74 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
75 '2. You might be breaking the Rules of Hooks\n' +
76 '3. You might have more than one copy of React in the same app\n' +
77 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
77 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
78 );
79 if (__DEV__) {
80 if (isInHookUserCodeInDev) {
@@ -82,7 +82,7 @@ function resolveCurrentlyRenderingComponent(): Object {
82 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' +
83 'You can only call Hooks at the top level of your React function. ' +
84 'For more information, see ' +
85 - 'https://fb.me/rules-of-hooks',
85 + 'https://reactjs.org/link/rules-of-hooks',
86 );
87 }
88 }
@@ -403,7 +403,7 @@ export function useLayoutEffect(
403 'to a mismatch between the initial, non-hydrated UI and the intended ' +
404 'UI. To avoid this, useLayoutEffect should only be used in ' +
405 'components that render exclusively on the client. ' +
406 - 'See https://fb.me/react-uselayouteffect-ssr for common fixes.',
406 + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.',
407 );
408 }
409 }
packages/react-dom/src/shared/ReactDOMInvalidARIAHook.js
+2 -2
@@ -95,14 +95,14 @@ function warnInvalidARIAProps(type, props) {
95 if (invalidProps.length === 1) {
96 console.error(
97 'Invalid aria prop %s on <%s> tag. ' +
98 - 'For details, see https://fb.me/invalid-aria-prop',
98 + 'For details, see https://reactjs.org/link/invalid-aria-props',
99 unknownPropString,
100 type,
101 );
102 } else if (invalidProps.length > 1) {
103 console.error(
104 'Invalid aria props %s on <%s> tag. ' +
105 - 'For details, see https://fb.me/invalid-aria-prop',
105 + 'For details, see https://reactjs.org/link/invalid-aria-props',
106 unknownPropString,
107 type,
108 );
packages/react-dom/src/shared/ReactDOMUnknownPropertyHook.js
+2 -2
@@ -256,7 +256,7 @@ const warnUnknownProperties = function(type, props, eventRegistry) {
256 console.error(
257 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' +
258 'or pass a string or number value to keep it in the DOM. ' +
259 - 'For details, see https://fb.me/react-attribute-behavior',
259 + 'For details, see https://reactjs.org/link/attribute-behavior ',
260 unknownPropString,
261 type,
262 );
@@ -264,7 +264,7 @@ const warnUnknownProperties = function(type, props, eventRegistry) {
264 console.error(
265 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' +
266 'or pass a string or number value to keep them in the DOM. ' +
267 - 'For details, see https://fb.me/react-attribute-behavior',
267 + 'For details, see https://reactjs.org/link/attribute-behavior ',
268 unknownPropString,
269 type,
270 );
packages/react-dom/src/shared/assertValidProps.js
+1 -1
@@ -33,7 +33,7 @@ function assertValidProps(tag: string, props: ?Object) {
33 typeof props.dangerouslySetInnerHTML === 'object' &&
34 HTML in props.dangerouslySetInnerHTML,
35 '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
36 - 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' +
36 + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
37 'for more information.',
38 );
39 }
packages/react-dom/src/test-utils/ReactTestUtils.js
+1 -1
@@ -324,7 +324,7 @@ function mockComponent(module, mockTagName) {
324 console.warn(
325 'ReactTestUtils.mockComponent() is deprecated. ' +
326 'Use shallow rendering or jest.mock() instead.\n\n' +
327 - 'See https://fb.me/test-utils-mock-component for more information.',
327 + 'See https://reactjs.org/link/test-utils-mock-component for more information.',
328 );
329 }
330 }
packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js
+4 -4
@@ -771,7 +771,7 @@ describe('ReactFabric', () => {
771 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
772 'Instead, add a ref directly to the element you want to reference. ' +
773 'Learn more about using refs safely here: ' +
774 - 'https://fb.me/react-strict-mode-find-node' +
774 + 'https://reactjs.org/link/strict-mode-find-node' +
775 '\n in RCTView (at **)' +
776 '\n in ContainsStrictModeChild (at **)',
777 ]);
@@ -808,7 +808,7 @@ describe('ReactFabric', () => {
808 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' +
809 'Instead, add a ref directly to the element you want to reference. ' +
810 'Learn more about using refs safely here: ' +
811 - 'https://fb.me/react-strict-mode-find-node' +
811 + 'https://reactjs.org/link/strict-mode-find-node' +
812 '\n in RCTView (at **)' +
813 '\n in IsInStrictMode (at **)',
814 ]);
@@ -842,7 +842,7 @@ describe('ReactFabric', () => {
842 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
843 'Instead, add a ref directly to the element you want to reference. ' +
844 'Learn more about using refs safely here: ' +
845 - 'https://fb.me/react-strict-mode-find-node' +
845 + 'https://reactjs.org/link/strict-mode-find-node' +
846 '\n in RCTView (at **)' +
847 '\n in ContainsStrictModeChild (at **)',
848 ]);
@@ -877,7 +877,7 @@ describe('ReactFabric', () => {
877 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' +
878 'Instead, add a ref directly to the element you want to reference. ' +
879 'Learn more about using refs safely here: ' +
880 - 'https://fb.me/react-strict-mode-find-node' +
880 + 'https://reactjs.org/link/strict-mode-find-node' +
881 '\n in RCTView (at **)' +
882 '\n in IsInStrictMode (at **)',
883 ]);
packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js
+4 -4
@@ -481,7 +481,7 @@ describe('ReactNative', () => {
481 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
482 'Instead, add a ref directly to the element you want to reference. ' +
483 'Learn more about using refs safely here: ' +
484 - 'https://fb.me/react-strict-mode-find-node' +
484 + 'https://reactjs.org/link/strict-mode-find-node' +
485 '\n in RCTView (at **)' +
486 '\n in ContainsStrictModeChild (at **)',
487 ]);
@@ -518,7 +518,7 @@ describe('ReactNative', () => {
518 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' +
519 'Instead, add a ref directly to the element you want to reference. ' +
520 'Learn more about using refs safely here: ' +
521 - 'https://fb.me/react-strict-mode-find-node' +
521 + 'https://reactjs.org/link/strict-mode-find-node' +
522 '\n in RCTView (at **)' +
523 '\n in IsInStrictMode (at **)',
524 ]);
@@ -552,7 +552,7 @@ describe('ReactNative', () => {
552 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' +
553 'Instead, add a ref directly to the element you want to reference. ' +
554 'Learn more about using refs safely here: ' +
555 - 'https://fb.me/react-strict-mode-find-node' +
555 + 'https://reactjs.org/link/strict-mode-find-node' +
556 '\n in RCTView (at **)' +
557 '\n in ContainsStrictModeChild (at **)',
558 ]);
@@ -587,7 +587,7 @@ describe('ReactNative', () => {
587 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' +
588 'Instead, add a ref directly to the element you want to reference. ' +
589 'Learn more about using refs safely here: ' +
590 - 'https://fb.me/react-strict-mode-find-node' +
590 + 'https://reactjs.org/link/strict-mode-find-node' +
591 '\n in RCTView (at **)' +
592 '\n in IsInStrictMode (at **)',
593 ]);
packages/react-native-renderer/src/legacy-events/SyntheticEvent.js
+1 -1
@@ -289,7 +289,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
289 "This synthetic event is reused for performance reasons. If you're seeing this, " +
290 "you're %s `%s` on a released/nullified synthetic event. %s. " +
291 'If you must keep the original synthetic event around, use event.persist(). ' +
292 - 'See https://fb.me/react-event-pooling for more information.',
292 + 'See https://reactjs.org/link/event-pooling for more information.',
293 action,
294 propName,
295 result,
packages/react-reconciler/src/ReactChildFiber.new.js
+5 -5
@@ -96,7 +96,7 @@ if (__DEV__) {
96
97 console.error(
98 'Each child in a list should have a unique ' +
99 - '"key" prop. See https://fb.me/react-warning-keys for ' +
99 + '"key" prop. See https://reactjs.org/link/warning-keys for ' +
100 'more information.',
101 );
102 };
@@ -137,7 +137,7 @@ function coerceRef(
137 'will be removed in a future major release. We recommend using ' +
138 'useRef() or createRef() instead. ' +
139 'Learn more about using refs safely here: ' +
140 - 'https://fb.me/react-strict-mode-string-ref',
140 + 'https://reactjs.org/link/strict-mode-string-ref',
141 componentName,
142 mixedRef,
143 );
@@ -147,7 +147,7 @@ function coerceRef(
147 'String refs are a source of potential bugs and should be avoided. ' +
148 'We recommend using useRef() or createRef() instead. ' +
149 'Learn more about using refs safely here: ' +
150 - 'https://fb.me/react-strict-mode-string-ref',
150 + 'https://reactjs.org/link/strict-mode-string-ref',
151 mixedRef,
152 );
153 }
@@ -166,7 +166,7 @@ function coerceRef(
166 'Function components cannot have string refs. ' +
167 'We recommend using useRef() instead. ' +
168 'Learn more about using refs safely here: ' +
169 - 'https://fb.me/react-strict-mode-string-ref',
169 + 'https://reactjs.org/link/strict-mode-string-ref',
170 );
171 inst = ownerFiber.stateNode;
172 }
@@ -212,7 +212,7 @@ function coerceRef(
212 '1. You may be adding a ref to a function component\n' +
213 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
214 '3. You have multiple copies of React loaded\n' +
215 - 'See https://fb.me/react-refs-must-have-owner for more information.',
215 + 'See https://reactjs.org/link/refs-must-have-owner for more information.',
216 mixedRef,
217 );
218 }
packages/react-reconciler/src/ReactChildFiber.old.js
+5 -5
@@ -96,7 +96,7 @@ if (__DEV__) {
96
97 console.error(
98 'Each child in a list should have a unique ' +
99 - '"key" prop. See https://fb.me/react-warning-keys for ' +
99 + '"key" prop. See https://reactjs.org/link/warning-keys for ' +
100 'more information.',
101 );
102 };
@@ -137,7 +137,7 @@ function coerceRef(
137 'will be removed in a future major release. We recommend using ' +
138 'useRef() or createRef() instead. ' +
139 'Learn more about using refs safely here: ' +
140 - 'https://fb.me/react-strict-mode-string-ref',
140 + 'https://reactjs.org/link/strict-mode-string-ref',
141 componentName,
142 mixedRef,
143 );
@@ -147,7 +147,7 @@ function coerceRef(
147 'String refs are a source of potential bugs and should be avoided. ' +
148 'We recommend using useRef() or createRef() instead. ' +
149 'Learn more about using refs safely here: ' +
150 - 'https://fb.me/react-strict-mode-string-ref',
150 + 'https://reactjs.org/link/strict-mode-string-ref',
151 mixedRef,
152 );
153 }
@@ -166,7 +166,7 @@ function coerceRef(
166 'Function components cannot have string refs. ' +
167 'We recommend using useRef() instead. ' +
168 'Learn more about using refs safely here: ' +
169 - 'https://fb.me/react-strict-mode-string-ref',
169 + 'https://reactjs.org/link/strict-mode-string-ref',
170 );
171 inst = ownerFiber.stateNode;
172 }
@@ -212,7 +212,7 @@ function coerceRef(
212 '1. You may be adding a ref to a function component\n' +
213 "2. You may be adding a ref to a component that was not created inside a component's render method\n" +
214 '3. You have multiple copies of React loaded\n' +
215 - 'See https://fb.me/react-refs-must-have-owner for more information.',
215 + 'See https://reactjs.org/link/refs-must-have-owner for more information.',
216 mixedRef,
217 );
218 }
packages/react-reconciler/src/ReactFiberClassComponent.new.js
+1 -1
@@ -729,7 +729,7 @@ function constructClassInstance(
729 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
730 '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' +
731 'The above lifecycles should be removed. Learn more about this warning here:\n' +
732 - 'https://fb.me/react-unsafe-component-lifecycles',
732 + 'https://reactjs.org/link/unsafe-component-lifecycles',
733 componentName,
734 newApiName,
735 foundWillMountName !== null ? `\n ${foundWillMountName}` : '',
packages/react-reconciler/src/ReactFiberClassComponent.old.js
+1 -1
@@ -729,7 +729,7 @@ function constructClassInstance(
729 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
730 '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' +
731 'The above lifecycles should be removed. Learn more about this warning here:\n' +
732 - 'https://fb.me/react-unsafe-component-lifecycles',
732 + 'https://reactjs.org/link/unsafe-component-lifecycles',
733 componentName,
734 newApiName,
735 foundWillMountName !== null ? `\n ${foundWillMountName}` : '',
packages/react-reconciler/src/ReactFiberCommitWork.new.js
+1 -1
@@ -408,7 +408,7 @@ function commitHookEffectListMount(tag: HookEffectTag, finishedWork: Fiber) {
408 ' }\n' +
409 ' fetchData();\n' +
410 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
411 - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
411 + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
412 } else {
413 addendum = ' You returned: ' + destroy;
414 }
packages/react-reconciler/src/ReactFiberCommitWork.old.js
+1 -1
@@ -359,7 +359,7 @@ function commitHookEffectListMount(tag: number, finishedWork: Fiber) {
359 ' }\n' +
360 ' fetchData();\n' +
361 `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
362 - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
362 + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
363 } else {
364 addendum = ' You returned: ' + destroy;
365 }
packages/react-reconciler/src/ReactFiberDevToolsHook.new.js
+1 -1
@@ -40,7 +40,7 @@ export function injectInternals(internals: Object): boolean {
40 console.error(
41 'The installed version of React DevTools is too old and will not work ' +
42 'with the current version of React. Please update React DevTools. ' +
43 - 'https://fb.me/react-devtools',
43 + 'https://reactjs.org/link/react-devtools',
44 );
45 }
46 // DevTools exists, even though it doesn't support Fiber.
packages/react-reconciler/src/ReactFiberDevToolsHook.old.js
+1 -1
@@ -40,7 +40,7 @@ export function injectInternals(internals: Object): boolean {
40 console.error(
41 'The installed version of React DevTools is too old and will not work ' +
42 'with the current version of React. Please update React DevTools. ' +
43 - 'https://fb.me/react-devtools',
43 + 'https://reactjs.org/link/react-devtools',
44 );
45 }
46 // DevTools exists, even though it doesn't support Fiber.
packages/react-reconciler/src/ReactFiberErrorLogger.js
+1 -1
@@ -65,7 +65,7 @@ export function logCapturedError(
65 } else {
66 errorBoundaryMessage =
67 'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
68 - 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
68 + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
69 }
70 const combinedMessage =
71 `${componentNameMessage}\n${componentStack}\n\n` +
packages/react-reconciler/src/ReactFiberHooks.new.js
+3 -3
@@ -279,7 +279,7 @@ function warnOnHookMismatchInDev(currentHookName: HookType) {
279 console.error(
280 'React has detected a change in the order of Hooks called by %s. ' +
281 'This will lead to bugs and errors if not fixed. ' +
282 - 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
282 + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
283 ' Previous render Next render\n' +
284 ' ------------------------------------------------------\n' +
285 '%s' +
@@ -300,7 +300,7 @@ function throwInvalidHookError() {
300 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
301 '2. You might be breaking the Rules of Hooks\n' +
302 '3. You might have more than one copy of React in the same app\n' +
303 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
303 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
304 );
305 }
306
@@ -1908,7 +1908,7 @@ if (__DEV__) {
1908 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' +
1909 'You can only call Hooks at the top level of your React function. ' +
1910 'For more information, see ' +
1911 - 'https://fb.me/rules-of-hooks',
1911 + 'https://reactjs.org/link/rules-of-hooks',
1912 );
1913 };
1914
packages/react-reconciler/src/ReactFiberHooks.old.js
+3 -3
@@ -278,7 +278,7 @@ function warnOnHookMismatchInDev(currentHookName: HookType) {
278 console.error(
279 'React has detected a change in the order of Hooks called by %s. ' +
280 'This will lead to bugs and errors if not fixed. ' +
281 - 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
281 + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
282 ' Previous render Next render\n' +
283 ' ------------------------------------------------------\n' +
284 '%s' +
@@ -299,7 +299,7 @@ function throwInvalidHookError() {
299 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
300 '2. You might be breaking the Rules of Hooks\n' +
301 '3. You might have more than one copy of React in the same app\n' +
302 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
302 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
303 );
304 }
305
@@ -1906,7 +1906,7 @@ if (__DEV__) {
1906 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' +
1907 'You can only call Hooks at the top level of your React function. ' +
1908 'For more information, see ' +
1909 - 'https://fb.me/rules-of-hooks',
1909 + 'https://reactjs.org/link/rules-of-hooks',
1910 );
1911 };
1912
packages/react-reconciler/src/ReactFiberReconciler.new.js
+2 -2
@@ -206,7 +206,7 @@ function findHostInstanceWithWarning(
206 '%s was passed an instance of %s which is inside StrictMode. ' +
207 'Instead, add a ref directly to the element you want to reference. ' +
208 'Learn more about using refs safely here: ' +
209 - 'https://fb.me/react-strict-mode-find-node',
209 + 'https://reactjs.org/link/strict-mode-find-node',
210 methodName,
211 methodName,
212 componentName,
@@ -217,7 +217,7 @@ function findHostInstanceWithWarning(
217 '%s was passed an instance of %s which renders StrictMode children. ' +
218 'Instead, add a ref directly to the element you want to reference. ' +
219 'Learn more about using refs safely here: ' +
220 - 'https://fb.me/react-strict-mode-find-node',
220 + 'https://reactjs.org/link/strict-mode-find-node',
221 methodName,
222 methodName,
223 componentName,
packages/react-reconciler/src/ReactFiberReconciler.old.js
+2 -2
@@ -206,7 +206,7 @@ function findHostInstanceWithWarning(
206 '%s was passed an instance of %s which is inside StrictMode. ' +
207 'Instead, add a ref directly to the element you want to reference. ' +
208 'Learn more about using refs safely here: ' +
209 - 'https://fb.me/react-strict-mode-find-node',
209 + 'https://reactjs.org/link/strict-mode-find-node',
210 methodName,
211 methodName,
212 componentName,
@@ -217,7 +217,7 @@ function findHostInstanceWithWarning(
217 '%s was passed an instance of %s which renders StrictMode children. ' +
218 'Instead, add a ref directly to the element you want to reference. ' +
219 'Learn more about using refs safely here: ' +
220 - 'https://fb.me/react-strict-mode-find-node',
220 + 'https://reactjs.org/link/strict-mode-find-node',
221 methodName,
222 methodName,
223 componentName,
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+5 -5
@@ -3411,7 +3411,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) {
3411 console.error(
3412 'Cannot update a component (`%s`) while rendering a ' +
3413 'different component (`%s`). To locate the bad setState() call inside `%s`, ' +
3414 - 'follow the stack trace as described in https://fb.me/setstate-in-render',
3414 + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render',
3415 setStateComponentName,
3416 renderingComponentName,
3417 renderingComponentName,
@@ -3494,7 +3494,7 @@ export function warnIfNotCurrentlyActingEffectsInDEV(fiber: Fiber): void {
3494 '/* assert on the output */\n\n' +
3495 "This ensures that you're testing the behavior the user would see " +
3496 'in the browser.' +
3497 - ' Learn more at https://fb.me/react-wrap-tests-with-act',
3497 + ' Learn more at https://reactjs.org/link/wrap-tests-with-act',
3498 getComponentName(fiber.type),
3499 );
3500 }
@@ -3522,7 +3522,7 @@ function warnIfNotCurrentlyActingUpdatesInDEV(fiber: Fiber): void {
3522 '/* assert on the output */\n\n' +
3523 "This ensures that you're testing the behavior the user would see " +
3524 'in the browser.' +
3525 - ' Learn more at https://fb.me/react-wrap-tests-with-act',
3525 + ' Learn more at https://reactjs.org/link/wrap-tests-with-act',
3526 getComponentName(fiber.type),
3527 );
3528 } finally {
@@ -3560,7 +3560,7 @@ export function warnIfUnmockedScheduler(fiber: Fiber) {
3560 // Break up requires to avoid accidentally parsing them as dependencies.
3561 "jest.mock('scheduler', () => require" +
3562 "('scheduler/unstable_mock'));\n\n" +
3563 - 'For more info, visit https://fb.me/react-mock-scheduler',
3563 + 'For more info, visit https://reactjs.org/link/mock-scheduler',
3564 );
3565 } else if (warnAboutUnmockedScheduler === true) {
3566 didWarnAboutUnmockedScheduler = true;
@@ -3571,7 +3571,7 @@ export function warnIfUnmockedScheduler(fiber: Fiber) {
3571 // Break up requires to avoid accidentally parsing them as dependencies.
3572 "jest.mock('scheduler', () => require" +
3573 "('scheduler/unstable_mock'));\n\n" +
3574 - 'For more info, visit https://fb.me/react-mock-scheduler',
3574 + 'For more info, visit https://reactjs.org/link/mock-scheduler',
3575 );
3576 }
3577 }
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+5 -5
@@ -3301,7 +3301,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) {
3301 console.error(
3302 'Cannot update a component (`%s`) while rendering a ' +
3303 'different component (`%s`). To locate the bad setState() call inside `%s`, ' +
3304 - 'follow the stack trace as described in https://fb.me/setstate-in-render',
3304 + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render',
3305 setStateComponentName,
3306 renderingComponentName,
3307 renderingComponentName,
@@ -3384,7 +3384,7 @@ export function warnIfNotCurrentlyActingEffectsInDEV(fiber: Fiber): void {
3384 '/* assert on the output */\n\n' +
3385 "This ensures that you're testing the behavior the user would see " +
3386 'in the browser.' +
3387 - ' Learn more at https://fb.me/react-wrap-tests-with-act',
3387 + ' Learn more at https://reactjs.org/link/wrap-tests-with-act',
3388 getComponentName(fiber.type),
3389 );
3390 }
@@ -3412,7 +3412,7 @@ function warnIfNotCurrentlyActingUpdatesInDEV(fiber: Fiber): void {
3412 '/* assert on the output */\n\n' +
3413 "This ensures that you're testing the behavior the user would see " +
3414 'in the browser.' +
3415 - ' Learn more at https://fb.me/react-wrap-tests-with-act',
3415 + ' Learn more at https://reactjs.org/link/wrap-tests-with-act',
3416 getComponentName(fiber.type),
3417 );
3418 } finally {
@@ -3450,7 +3450,7 @@ export function warnIfUnmockedScheduler(fiber: Fiber) {
3450 // Break up requires to avoid accidentally parsing them as dependencies.
3451 "jest.mock('scheduler', () => require" +
3452 "('scheduler/unstable_mock'));\n\n" +
3453 - 'For more info, visit https://fb.me/react-mock-scheduler',
3453 + 'For more info, visit https://reactjs.org/link/mock-scheduler',
3454 );
3455 } else if (warnAboutUnmockedScheduler === true) {
3456 didWarnAboutUnmockedScheduler = true;
@@ -3461,7 +3461,7 @@ export function warnIfUnmockedScheduler(fiber: Fiber) {
3461 // Break up requires to avoid accidentally parsing them as dependencies.
3462 "jest.mock('scheduler', () => require" +
3463 "('scheduler/unstable_mock'));\n\n" +
3464 - 'For more info, visit https://fb.me/react-mock-scheduler',
3464 + 'For more info, visit https://reactjs.org/link/mock-scheduler',
3465 );
3466 }
3467 }
packages/react-reconciler/src/ReactStrictModeWarnings.new.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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
196 + 'See https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
210 + 'See https://reactjs.org/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://fb.me/react-derived-state\n' +
214 + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
227 + 'See https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
239 + 'See https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
257 + 'See https://reactjs.org/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://fb.me/react-derived-state\n' +
261 + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
276 + 'See https://reactjs.org/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://fb.me/react-legacy-context',
349 + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context',
350 sortedNames,
351 );
352 } finally {
packages/react-reconciler/src/ReactStrictModeWarnings.old.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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
196 + 'See https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
210 + 'See https://reactjs.org/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://fb.me/react-derived-state\n' +
214 + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
227 + 'See https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
239 + 'See https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
257 + 'See https://reactjs.org/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://fb.me/react-derived-state\n' +
261 + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/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://fb.me/react-unsafe-component-lifecycles for details.\n\n' +
276 + 'See https://reactjs.org/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://fb.me/react-legacy-context',
349 + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context',
350 sortedNames,
351 );
352 } finally {
packages/react-reconciler/src/SchedulerWithReactIntegration.new.js
+1 -1
@@ -49,7 +49,7 @@ if (enableSchedulerTracing) {
49 'example, `react-dom/profiling`) without also replacing the ' +
50 '`scheduler/tracing` module with `scheduler/tracing-profiling`. Your ' +
51 'bundler might have a setting for aliasing both modules. Learn more at ' +
52 - 'http://fb.me/react-profiling',
52 + 'https://reactjs.org/link/profiling',
53 );
54 }
55
packages/react-reconciler/src/SchedulerWithReactIntegration.old.js
+1 -1
@@ -49,7 +49,7 @@ if (enableSchedulerTracing) {
49 'example, `react-dom/profiling`) without also replacing the ' +
50 '`scheduler/tracing` module with `scheduler/tracing-profiling`. Your ' +
51 'bundler might have a setting for aliasing both modules. Learn more at ' +
52 - 'http://fb.me/react-profiling',
52 + 'https://reactjs.org/link/profiling',
53 );
54 }
55
packages/react-reconciler/src/__tests__/ReactBlocks-test.js
+1 -1
@@ -102,7 +102,7 @@ describe('ReactBlocks', () => {
102 }).toErrorDev(
103 'Warning: Each child in a list should have a unique ' +
104 '"key" prop.\n\nCheck the render method of `User`. See ' +
105 - 'https://fb.me/react-warning-keys for more information.\n' +
105 + 'https://reactjs.org/link/warning-keys for more information.\n' +
106 ' in span (at **)\n' +
107 ' in User (at **)\n' +
108 ' in Suspense (at **)\n' +
packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
+9 -9
@@ -51,7 +51,7 @@ describe('ReactHooks', () => {
51 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
52 '2. You might be breaking the Rules of Hooks\n' +
53 '3. You might have more than one copy of React in the same app\n' +
54 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
54 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
55 );
56 });
57 }
@@ -906,7 +906,7 @@ describe('ReactHooks', () => {
906 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
907 '2. You might be breaking the Rules of Hooks\n' +
908 '3. You might have more than one copy of React in the same app\n' +
909 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
909 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
910 );
911 // the next round, it does a fresh mount, so should render
912 expect(() => root.update(<MemoApp />)).not.toThrow(
@@ -915,7 +915,7 @@ describe('ReactHooks', () => {
915 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
916 '2. You might be breaking the Rules of Hooks\n' +
917 '3. You might have more than one copy of React in the same app\n' +
918 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
918 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
919 );
920 // and then again, fail
921 expect(() => root.update(<MemoApp />)).toThrow(
@@ -924,7 +924,7 @@ describe('ReactHooks', () => {
924 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
925 '2. You might be breaking the Rules of Hooks\n' +
926 '3. You might have more than one copy of React in the same app\n' +
927 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
927 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
928 );
929 });
930
@@ -1115,7 +1115,7 @@ describe('ReactHooks', () => {
1115 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks',
1116 'Warning: React has detected a change in the order of Hooks called by App. ' +
1117 'This will lead to bugs and errors if not fixed. For more information, ' +
1118 - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
1118 + 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1119 ' Previous render Next render\n' +
1120 ' ------------------------------------------------------\n' +
1121 '1. useReducer useReducer\n' +
@@ -1573,7 +1573,7 @@ describe('ReactHooks', () => {
1573 }).toErrorDev([
1574 'Warning: React has detected a change in the order of Hooks called by App. ' +
1575 'This will lead to bugs and errors if not fixed. For more information, ' +
1576 - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
1576 + 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1577 ' Previous render Next render\n' +
1578 ' ------------------------------------------------------\n' +
1579 `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameB)}\n` +
@@ -1624,7 +1624,7 @@ describe('ReactHooks', () => {
1624 }).toErrorDev([
1625 'Warning: React has detected a change in the order of Hooks called by App. ' +
1626 'This will lead to bugs and errors if not fixed. For more information, ' +
1627 - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
1627 + 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1628 ' Previous render Next render\n' +
1629 ' ------------------------------------------------------\n' +
1630 `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameA)}\n` +
@@ -1704,7 +1704,7 @@ describe('ReactHooks', () => {
1704 }).toErrorDev([
1705 'Warning: React has detected a change in the order of Hooks called by App. ' +
1706 'This will lead to bugs and errors if not fixed. For more information, ' +
1707 - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
1707 + 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1708 ' Previous render Next render\n' +
1709 ' ------------------------------------------------------\n' +
1710 `1. ${formatHookNamesToMatchErrorMessage(
@@ -1746,7 +1746,7 @@ describe('ReactHooks', () => {
1746 }).toErrorDev([
1747 'Warning: React has detected a change in the order of Hooks called by App. ' +
1748 'This will lead to bugs and errors if not fixed. For more information, ' +
1749 - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
1749 + 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
1750 ' Previous render Next render\n' +
1751 ' ------------------------------------------------------\n' +
1752 '1. useReducer useState\n' +
packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js
+5 -5
@@ -162,7 +162,7 @@ describe('ReactHooksWithNoopRenderer', () => {
162 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
163 '2. You might be breaking the Rules of Hooks\n' +
164 '3. You might have more than one copy of React in the same app\n' +
165 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
165 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
166 );
167
168 // Confirm that a subsequent hook works properly.
@@ -192,7 +192,7 @@ describe('ReactHooksWithNoopRenderer', () => {
192 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
193 '2. You might be breaking the Rules of Hooks\n' +
194 '3. You might have more than one copy of React in the same app\n' +
195 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
195 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
196 ),
197 ).toErrorDev(
198 'Warning: The <Counter /> component appears to be a function component that returns a class instance. ' +
@@ -219,7 +219,7 @@ describe('ReactHooksWithNoopRenderer', () => {
219 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
220 '2. You might be breaking the Rules of Hooks\n' +
221 '3. You might have more than one copy of React in the same app\n' +
222 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
222 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
223 );
224 });
225
@@ -3406,7 +3406,7 @@ describe('ReactHooksWithNoopRenderer', () => {
3406 }).toErrorDev([
3407 'Warning: React has detected a change in the order of Hooks called by App. ' +
3408 'This will lead to bugs and errors if not fixed. For more information, ' +
3409 - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
3409 + 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
3410 ' Previous render Next render\n' +
3411 ' ------------------------------------------------------\n' +
3412 '1. useState useState\n' +
@@ -3502,7 +3502,7 @@ describe('ReactHooksWithNoopRenderer', () => {
3502 }).toErrorDev([
3503 'Warning: React has detected a change in the order of Hooks called by App. ' +
3504 'This will lead to bugs and errors if not fixed. For more information, ' +
3505 - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' +
3505 + 'read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' +
3506 ' Previous render Next render\n' +
3507 ' ------------------------------------------------------\n' +
3508 '1. useEffect useEffect\n' +
packages/react-reconciler/src/__tests__/ReactNewContext-test.js
+2 -2
@@ -1525,7 +1525,7 @@ describe('ReactNewContext', () => {
1525 'You passed: 0.\n\n' +
1526 'Did you call array.map(useContext)? ' +
1527 'Calling Hooks inside a loop is not supported. ' +
1528 - 'Learn more at https://fb.me/rules-of-hooks',
1528 + 'Learn more at https://reactjs.org/link/rules-of-hooks',
1529 );
1530 });
1531
@@ -1543,7 +1543,7 @@ describe('ReactNewContext', () => {
1543 '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
1544 '2. You might be breaking the Rules of Hooks\n' +
1545 '3. You might have more than one copy of React in the same app\n' +
1546 - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
1546 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
1547 );
1548 });
1549
packages/react-reconciler/src/__tests__/ReactTracing-test.internal.js
+1 -1
@@ -22,7 +22,7 @@ describe('ReactTracing', () => {
22 ReactFeatureFlags.enableSchedulerTracing = true;
23
24 expect(() => require('react-dom')).toThrow(
25 - 'Learn more at http://fb.me/react-profiling',
25 + 'Learn more at https://reactjs.org/link/profiling',
26 );
27 });
28 });
packages/react/src/ReactElement.js
+3 -3
@@ -61,7 +61,7 @@ function defineKeyPropWarningGetter(props, displayName) {
61 '%s: `key` is not a prop. Trying to access it will result ' +
62 'in `undefined` being returned. If you need to access the same ' +
63 'value within the child component, you should pass it as a different ' +
64 - 'prop. (https://fb.me/react-special-props)',
64 + 'prop. (https://reactjs.org/link/special-props)',
65 displayName,
66 );
67 }
@@ -83,7 +83,7 @@ function defineRefPropWarningGetter(props, displayName) {
83 '%s: `ref` is not a prop. Trying to access it will result ' +
84 'in `undefined` being returned. If you need to access the same ' +
85 'value within the child component, you should pass it as a different ' +
86 - 'prop. (https://fb.me/react-special-props)',
86 + 'prop. (https://reactjs.org/link/special-props)',
87 displayName,
88 );
89 }
@@ -113,7 +113,7 @@ function warnIfStringRefCannotBeAutoConverted(config) {
113 'This case cannot be automatically converted to an arrow function. ' +
114 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +
115 'Learn more about using refs safely here: ' +
116 - 'https://fb.me/react-strict-mode-string-ref',
116 + 'https://reactjs.org/link/strict-mode-string-ref',
117 componentName,
118 config.ref,
119 );
packages/react/src/ReactElementValidator.js
+1 -1
@@ -148,7 +148,7 @@ function validateExplicitKey(element, parentType) {
148 setCurrentlyValidatingElement(element);
149 console.error(
150 'Each child in a list should have a unique "key" prop.' +
151 - '%s%s See https://fb.me/react-warning-keys for more information.',
151 + '%s%s See https://reactjs.org/link/warning-keys for more information.',
152 currentComponentErrorInfo,
153 childOwner,
154 );
packages/react/src/ReactHooks.js
+2 -2
@@ -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://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
34 + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
35 );
36 return dispatcher;
37 }
@@ -51,7 +51,7 @@ export function useContext<T>(
51 typeof unstable_observedBits === 'number' && Array.isArray(arguments[2])
52 ? '\n\nDid you call array.map(useContext)? ' +
53 'Calling Hooks inside a loop is not supported. ' +
54 - 'Learn more at https://fb.me/rules-of-hooks'
54 + 'Learn more at https://reactjs.org/link/rules-of-hooks'
55 : '',
56 );
57 }
packages/react/src/__tests__/ReactChildren-test.js
+2 -2
@@ -974,7 +974,7 @@ describe('ReactChildren', () => {
974 ).toErrorDev(
975 'Warning: ' +
976 'Each child in a list should have a unique "key" prop.' +
977 - ' See https://fb.me/react-warning-keys for more information.' +
977 + ' See https://reactjs.org/link/warning-keys for more information.' +
978 '\n in ComponentReturningArray (at **)',
979 );
980 });
@@ -995,7 +995,7 @@ describe('ReactChildren', () => {
995 ).toErrorDev(
996 'Warning: ' +
997 'Each child in a list should have a unique "key" prop.' +
998 - ' See https://fb.me/react-warning-keys for more information.',
998 + ' See https://reactjs.org/link/warning-keys for more information.',
999 {withoutStack: true}, // There's nothing on the stack
1000 );
1001 });
packages/react/src/__tests__/ReactElement-test.js
+3 -3
@@ -79,7 +79,7 @@ describe('ReactElement', () => {
79 'Child: `key` is not a prop. Trying to access it will result ' +
80 'in `undefined` being returned. If you need to access the same ' +
81 'value within the child component, you should pass it as a different ' +
82 - 'prop. (https://fb.me/react-special-props)',
82 + 'prop. (https://reactjs.org/link/special-props)',
83 );
84 });
85
@@ -91,7 +91,7 @@ describe('ReactElement', () => {
91 'div: `key` is not a prop. Trying to access it will result ' +
92 'in `undefined` being returned. If you need to access the same ' +
93 'value within the child component, you should pass it as a different ' +
94 - 'prop. (https://fb.me/react-special-props)',
94 + 'prop. (https://reactjs.org/link/special-props)',
95 {withoutStack: true},
96 );
97 });
@@ -116,7 +116,7 @@ describe('ReactElement', () => {
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://fb.me/react-special-props)',
119 + 'prop. (https://reactjs.org/link/special-props)',
120 );
121 });
122
packages/react/src/__tests__/ReactElementJSX-test.js
+4 -4
@@ -231,7 +231,7 @@ describe('ReactElement.jsx', () => {
231 'Child: `key` is not a prop. Trying to access it will result ' +
232 'in `undefined` being returned. If you need to access the same ' +
233 'value within the child component, you should pass it as a different ' +
234 - 'prop. (https://fb.me/react-special-props)',
234 + 'prop. (https://reactjs.org/link/special-props)',
235 );
236 });
237
@@ -258,7 +258,7 @@ describe('ReactElement.jsx', () => {
258 'div: `key` is not a prop. Trying to access it will result ' +
259 'in `undefined` being returned. If you need to access the same ' +
260 'value within the child component, you should pass it as a different ' +
261 - 'prop. (https://fb.me/react-special-props)',
261 + 'prop. (https://reactjs.org/link/special-props)',
262 {withoutStack: true},
263 );
264 });
@@ -283,7 +283,7 @@ describe('ReactElement.jsx', () => {
283 'Child: `ref` is not a prop. Trying to access it will result ' +
284 'in `undefined` being returned. If you need to access the same ' +
285 'value within the child component, you should pass it as a different ' +
286 - 'prop. (https://fb.me/react-special-props)',
286 + 'prop. (https://reactjs.org/link/special-props)',
287 );
288 });
289
@@ -363,7 +363,7 @@ describe('ReactElement.jsx', () => {
363 ReactDOM.render(JSXRuntime.jsx(Parent, {}), container),
364 ).toErrorDev(
365 'Warning: Each child in a list should have a unique "key" prop.\n\n' +
366 - 'Check the render method of `Parent`. See https://fb.me/react-warning-keys for more information.\n' +
366 + 'Check the render method of `Parent`. See https://reactjs.org/link/warning-keys for more information.\n' +
367 ' in Child (at **)\n' +
368 ' in Parent (at **)',
369 );
packages/react/src/__tests__/ReactElementValidator-test.internal.js
+3 -3
@@ -86,7 +86,7 @@ describe('ReactElementValidator', () => {
86 ReactTestUtils.renderIntoDocument(<Anonymous>{divs}</Anonymous>);
87 }).toErrorDev(
88 'Warning: Each child in a list should have a unique ' +
89 - '"key" prop. See https://fb.me/react-warning-keys for more information.\n' +
89 + '"key" prop. See https://reactjs.org/link/warning-keys for more information.\n' +
90 ' in div (at **)',
91 );
92 });
@@ -99,7 +99,7 @@ describe('ReactElementValidator', () => {
99 }).toErrorDev(
100 'Warning: Each child in a list should have a unique ' +
101 '"key" prop.\n\nCheck the top-level render call using <div>. See ' +
102 - 'https://fb.me/react-warning-keys for more information.\n' +
102 + 'https://reactjs.org/link/warning-keys for more information.\n' +
103 ' in div (at **)',
104 );
105 });
@@ -120,7 +120,7 @@ describe('ReactElementValidator', () => {
120 expect(() => ReactTestUtils.renderIntoDocument(<GrandParent />)).toErrorDev(
121 'Warning: Each child in a list should have a unique ' +
122 '"key" prop.\n\nCheck the render method of `Component`. See ' +
123 - 'https://fb.me/react-warning-keys for more information.\n' +
123 + 'https://reactjs.org/link/warning-keys for more information.\n' +
124 ' in div (at **)\n' +
125 ' in Component (at **)\n' +
126 ' in Parent (at **)\n' +
packages/react/src/__tests__/ReactStrictMode-test.js
+15 -15
@@ -403,18 +403,18 @@ describe('Concurrent Mode', () => {
403 expect(() => Scheduler.unstable_flushAll()).toErrorDev(
404 [
405 /* eslint-disable max-len */
406 - `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
406 + `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.
407
408 * Move code with side effects to componentDidMount, and set initial state in the constructor.
409
410 Please update the following components: AsyncRoot`,
411 - `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
411 + `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.
412
413 * Move data fetching code or side effects to componentDidUpdate.
414 -* 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://fb.me/react-derived-state
414 +* 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
415
416 Please update the following components: Bar, Foo`,
417 - `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
417 + `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.
418
419 * Move data fetching code or side effects to componentDidUpdate.
420
@@ -461,18 +461,18 @@ Please update the following components: AsyncRoot`,
461 expect(() => Scheduler.unstable_flushAll()).toErrorDev(
462 [
463 /* eslint-disable max-len */
464 - `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
464 + `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.
465
466 * Move code with side effects to componentDidMount, and set initial state in the constructor.
467
468 Please update the following components: AsyncRoot`,
469 - `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
469 + `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.
470
471 * Move data fetching code or side effects to componentDidUpdate.
472 -* 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://fb.me/react-derived-state
472 +* 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
473
474 Please update the following components: Child`,
475 - `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
475 + `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.
476
477 * Move data fetching code or side effects to componentDidUpdate.
478
@@ -484,20 +484,20 @@ Please update the following components: AsyncRoot`,
484 }).toWarnDev(
485 [
486 /* eslint-disable max-len */
487 - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
487 + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
488
489 * Move code with side effects to componentDidMount, and set initial state in the constructor.
490 * 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.
491
492 Please update the following components: Parent`,
493 - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
493 + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
494
495 * Move data fetching code or side effects to componentDidUpdate.
496 -* 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://fb.me/react-derived-state
496 +* 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
497 * 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.
498
499 Please update the following components: Parent`,
500 - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
500 + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
501
502 * Move data fetching code or side effects to componentDidUpdate.
503 * 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.
@@ -753,7 +753,7 @@ describe('string refs', () => {
753 'String refs are a source of potential bugs and should be avoided. ' +
754 'We recommend using useRef() or createRef() instead. ' +
755 'Learn more about using refs safely here: ' +
756 - 'https://fb.me/react-strict-mode-string-ref\n' +
756 + 'https://reactjs.org/link/strict-mode-string-ref\n' +
757 ' in OuterComponent (at **)',
758 );
759
@@ -794,7 +794,7 @@ describe('string refs', () => {
794 'String refs are a source of potential bugs and should be avoided. ' +
795 'We recommend using useRef() or createRef() instead. ' +
796 'Learn more about using refs safely here: ' +
797 - 'https://fb.me/react-strict-mode-string-ref\n' +
797 + 'https://reactjs.org/link/strict-mode-string-ref\n' +
798 ' in InnerComponent (at **)\n' +
799 ' in OuterComponent (at **)',
800 );
@@ -874,7 +874,7 @@ describe('context legacy', () => {
874 '\n\nPlease update the following components: ' +
875 'FunctionalLegacyContextConsumer, LegacyContextConsumer, LegacyContextProvider' +
876 '\n\nLearn more about this warning here: ' +
877 - 'https://fb.me/react-legacy-context' +
877 + 'https://reactjs.org/link/legacy-context' +
878 '\n in LegacyContextProvider (at **)' +
879 '\n in div (at **)' +
880 '\n in Root (at **)',
packages/react/src/__tests__/createReactClassIntegration-test.js
+2 -2
@@ -555,7 +555,7 @@ describe('create-react-class-integration', () => {
555 ' componentWillReceiveProps\n' +
556 ' componentWillUpdate\n\n' +
557 'The above lifecycles should be removed. Learn more about this warning here:\n' +
558 - 'https://fb.me/react-unsafe-component-lifecycles',
558 + 'https://reactjs.org/link/unsafe-component-lifecycles',
559 );
560 }).toWarnDev(
561 [
@@ -598,7 +598,7 @@ describe('create-react-class-integration', () => {
598 ' componentWillReceiveProps\n' +
599 ' componentWillUpdate\n\n' +
600 'The above lifecycles should be removed. Learn more about this warning here:\n' +
601 - 'https://fb.me/react-unsafe-component-lifecycles',
601 + 'https://reactjs.org/link/unsafe-component-lifecycles',
602 );
603 }).toWarnDev(
604 [
packages/react/src/jsx/ReactJSXElement.js
+3 -3
@@ -70,7 +70,7 @@ function warnIfStringRefCannotBeAutoConverted(config, self) {
70 'This case cannot be automatically converted to an arrow function. ' +
71 'We ask you to manually fix this case by using useRef() or createRef() instead. ' +
72 'Learn more about using refs safely here: ' +
73 - 'https://fb.me/react-strict-mode-string-ref',
73 + 'https://reactjs.org/link/strict-mode-string-ref',
74 getComponentName(ReactCurrentOwner.current.type),
75 config.ref,
76 );
@@ -89,7 +89,7 @@ function defineKeyPropWarningGetter(props, displayName) {
89 '%s: `key` is not a prop. Trying to access it will result ' +
90 'in `undefined` being returned. If you need to access the same ' +
91 'value within the child component, you should pass it as a different ' +
92 - 'prop. (https://fb.me/react-special-props)',
92 + 'prop. (https://reactjs.org/link/special-props)',
93 displayName,
94 );
95 }
@@ -111,7 +111,7 @@ function defineRefPropWarningGetter(props, displayName) {
111 '%s: `ref` is not a prop. Trying to access it will result ' +
112 'in `undefined` being returned. If you need to access the same ' +
113 'value within the child component, you should pass it as a different ' +
114 - 'prop. (https://fb.me/react-special-props)',
114 + 'prop. (https://reactjs.org/link/special-props)',
115 displayName,
116 );
117 }
packages/react/src/jsx/ReactJSXElementValidator.js
+1 -1
@@ -162,7 +162,7 @@ function validateExplicitKey(element, parentType) {
162 setCurrentlyValidatingElement(element);
163 console.error(
164 'Each child in a list should have a unique "key" prop.' +
165 - '%s%s See https://fb.me/react-warning-keys for more information.',
165 + '%s%s See https://reactjs.org/link/warning-keys for more information.',
166 currentComponentErrorInfo,
167 childOwner,
168 );
packages/scheduler/src/forks/SchedulerHostConfig.default.js
+2 -2
@@ -91,7 +91,7 @@ if (
91 console['error'](
92 "This browser doesn't support requestAnimationFrame. " +
93 'Make sure that you load a ' +
94 - 'polyfill in older browsers. https://fb.me/react-polyfills',
94 + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills',
95 );
96 }
97 if (typeof cancelAnimationFrame !== 'function') {
@@ -99,7 +99,7 @@ if (
99 console['error'](
100 "This browser doesn't support cancelAnimationFrame. " +
101 'Make sure that you load a ' +
102 - 'polyfill in older browsers. https://fb.me/react-polyfills',
102 + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills',
103 );
104 }
105 }
packages/shared/invokeGuardedCallbackImpl.js
+1 -1
@@ -215,7 +215,7 @@ if (__DEV__) {
215 error = new Error(
216 "A cross-origin error was thrown. React doesn't have access to " +
217 'the actual error object in development. ' +
218 - 'See https://fb.me/react-crossorigin-error for more information.',
218 + 'See https://reactjs.org/link/crossorigin-error for more information.',
219 );
220 }
221 this.onError(error);
scripts/error-codes/codes.json
+13 -13
@@ -60,7 +60,7 @@
60 "58": "dangerouslyReplaceNodeWithMarkup(...): 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://fb.me/react-invariant-dangerously-set-inner-html for more information.",
63 + "61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/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": "trapBubbledEvent(...): 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": "addComponentAsRefTo(...): 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://fb.me/react-refs-must-have-owner).",
122 - "120": "removeComponentAsRefFrom(...): 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://fb.me/react-refs-must-have-owner).",
121 + "119": "addComponentAsRefTo(...): 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": "removeComponentAsRefFrom(...): 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).",
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://fb.me/react-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://reactjs.org/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": "%s(...): 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://fb.me/react-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://reactjs.org/link/refs-must-have-owner for more information.",
256 "255": "Expected ReactFbErrorUtils.invokeGuardedCallback to be a function.",
257 "256": "Expected ReactFiberErrorDialog.showErrorDialog to be a function.",
258 "257": "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.",
@@ -274,7 +274,7 @@
274 "273": "Nesting of <View> within <Text> is not currently supported.",
275 "274": "Text strings must be rendered within a <Text> component.",
276 "275": "The current renderer does not support mutation. This error is likely caused by a bug in React. Please file an issue.",
277 - "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills",
277 + "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills",
278 "277": "Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.",
279 "278": "unstable_createRoot(...): Target container is not a DOM element.",
280 "279": "Trying to release an event instance into a pool of a different type.",
@@ -285,10 +285,10 @@
285 "284": "Expected ref to be a function, a string, an object returned by React.createRef(), or null.",
286 "285": "The root failed to unmount after an error. This is likely a bug in React. Please file an issue.",
287 "286": "%s(...): the first argument must be a React class instance. Instead received: %s.",
288 - "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 http://fb.me/react-profiling",
289 - "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 http://fb.me/react-profiling",
288 + "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",
289 + "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",
290 "289": "Function components cannot have refs.",
291 - "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://fb.me/react-refs-must-have-owner for more information.",
291 + "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.",
292 "291": "Log of yielded values is not empty. Call expect(Scheduler).toHaveYielded(...) first.",
293 "292": "The matcher `toHaveYielded` expects an instance of React Test Renderer.\n\nTry: expect(Scheduler).toHaveYielded(expectedYields)",
294 "293": "Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.",
@@ -300,14 +300,14 @@
300 "299": "createRoot(...): Target container is not a DOM element.",
301 "300": "Rendered fewer hooks than expected. This may be caused by an accidental early return statement.",
302 "301": "Too many re-renders. React limits the number of renders to prevent an infinite loop.",
303 - "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 http://fb.me/react-profiling",
303 + "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",
304 "303": "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.",
305 "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.",
306 "305": "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.",
307 "306": "Element type is invalid. Received a promise that resolves to: %s. Lazy element type must resolve to a class or function.%s",
308 - "307": "Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)",
308 + "307": "Hooks can only be called inside the body of a function component. (https://reactjs.org/link/invalid-hook-call)",
309 "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().",
310 - "309": "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref",
310 + "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",
311 "310": "Rendered more hooks than during the previous render.",
312 "311": "Should have a queue. This is likely a bug in React. Please file an issue.",
313 "312": "Rendered more hooks than during the previous render",
@@ -319,7 +319,7 @@
319 "318": "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.",
320 "319": "A dehydrated suspense boundary must commit before trying to render. This is probably a bug in React.",
321 "320": "Expected ReactFiberErrorDialog.showErrorDialog to be a function.",
322 - "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://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.",
322 + "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.",
323 "322": "forwardRef requires a render function but was given %s.",
324 "323": "React has blocked a javascript: URL as a security precaution.",
325 "326": "Expected a valid priority level",