From 5ab87c2442adc6c417dce1547a406a81957a1957 Mon Sep 17 00:00:00 2001 From: cylim Date: Wed, 12 Aug 2020 21:50:15 +0800 Subject: [PATCH] refactor fb.me redirect link to origin link --- .../ESLintRuleExhaustiveDeps-test.js | 4 +-- .../src/ExhaustiveDeps.js | 2 +- .../__tests__/ReactHooksInspection-test.js | 2 +- .../ReactHooksInspectionIntegration-test.js | 2 +- .../devtools/views/Profiler/NoInteractions.js | 2 +- .../src/devtools/views/Profiler/Profiler.js | 2 +- packages/react-devtools-shared/src/hook.js | 2 +- .../__tests__/ReactComponentLifeCycle-test.js | 24 ++++++------- .../src/__tests__/ReactDOMAttribute-test.js | 5 +-- .../src/__tests__/ReactDOMComponent-test.js | 8 ++--- .../__tests__/ReactDOMComponentTree-test.js | 2 +- .../src/__tests__/ReactDOMInput-test.js | 36 +++++++++---------- .../__tests__/ReactDOMInvalidARIAHook-test.js | 4 +-- .../src/__tests__/ReactDOMSelect-test.js | 2 +- .../ReactDOMServerIntegrationHooks-test.js | 4 +-- ...erIntegrationUntrustedURL-test.internal.js | 4 +-- .../ReactDOMServerLifecycles-test.js | 2 +- .../src/__tests__/ReactDOMTextarea-test.js | 2 +- .../ReactDeprecationWarnings-test.internal.js | 6 ++-- .../__tests__/ReactFunctionComponent-test.js | 2 +- .../src/__tests__/ReactTestUtils-test.js | 2 +- .../src/__tests__/findDOMNode-test.js | 4 +-- .../multiple-copies-of-react-test.js | 2 +- packages/react-dom/src/__tests__/refs-test.js | 2 +- packages/react-dom/src/client/ReactDOM.js | 6 ++-- .../react-dom/src/client/ReactDOMInput.js | 8 ++--- .../react-dom/src/client/ReactDOMSelect.js | 2 +- .../react-dom/src/client/ReactDOMTextarea.js | 2 +- .../src/server/ReactPartialRenderer.js | 10 +++--- .../src/server/ReactPartialRendererHooks.js | 6 ++-- .../src/shared/ReactDOMInvalidARIAHook.js | 4 +-- .../src/shared/ReactDOMUnknownPropertyHook.js | 4 +-- .../react-dom/src/shared/assertValidProps.js | 2 +- .../src/test-utils/ReactTestUtils.js | 2 +- .../__tests__/ReactFabric-test.internal.js | 8 ++--- .../ReactNativeMount-test.internal.js | 8 ++--- .../src/legacy-events/SyntheticEvent.js | 2 +- .../src/ReactChildFiber.new.js | 10 +++--- .../src/ReactChildFiber.old.js | 10 +++--- .../src/ReactFiberClassComponent.new.js | 2 +- .../src/ReactFiberClassComponent.old.js | 2 +- .../src/ReactFiberCommitWork.new.js | 2 +- .../src/ReactFiberCommitWork.old.js | 2 +- .../src/ReactFiberDevToolsHook.new.js | 2 +- .../src/ReactFiberDevToolsHook.old.js | 2 +- .../src/ReactFiberErrorLogger.js | 2 +- .../src/ReactFiberHooks.new.js | 6 ++-- .../src/ReactFiberHooks.old.js | 6 ++-- .../src/ReactFiberReconciler.new.js | 4 +-- .../src/ReactFiberReconciler.old.js | 4 +-- .../src/ReactFiberWorkLoop.new.js | 6 ++-- .../src/ReactFiberWorkLoop.old.js | 6 ++-- .../src/ReactStrictModeWarnings.new.js | 18 +++++----- .../src/ReactStrictModeWarnings.old.js | 18 +++++----- .../src/SchedulerWithReactIntegration.new.js | 2 +- .../src/SchedulerWithReactIntegration.old.js | 2 +- .../src/__tests__/ReactBlocks-test.js | 2 +- .../src/__tests__/ReactHooks-test.internal.js | 18 +++++----- .../ReactHooksWithNoopRenderer-test.js | 10 +++--- .../src/__tests__/ReactNewContext-test.js | 4 +-- .../__tests__/ReactTracing-test.internal.js | 2 +- packages/react/src/ReactElement.js | 6 ++-- packages/react/src/ReactElementValidator.js | 2 +- packages/react/src/ReactHooks.js | 4 +-- .../react/src/__tests__/ReactChildren-test.js | 4 +-- .../react/src/__tests__/ReactElement-test.js | 6 ++-- .../src/__tests__/ReactElementJSX-test.js | 8 ++--- .../ReactElementValidator-test.internal.js | 6 ++-- .../src/__tests__/ReactStrictMode-test.js | 30 ++++++++-------- .../createReactClassIntegration-test.js | 6 ++-- packages/react/src/jsx/ReactJSXElement.js | 6 ++-- .../react/src/jsx/ReactJSXElementValidator.js | 2 +- .../src/forks/SchedulerHostConfig.default.js | 5 ++- packages/shared/invokeGuardedCallbackImpl.js | 2 +- scripts/error-codes/codes.json | 26 +++++++------- 75 files changed, 223 insertions(+), 223 deletions(-) diff --git a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js index de6d0aa4f7e07..302a17ec4ed49 100644 --- a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js +++ b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js @@ -6575,7 +6575,7 @@ const tests = { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching', + 'Learn more about data fetching with Hooks: https://reactjs.org/docs/hooks-faq.html#how-can-i-do-data-fetching-with-hooks', suggestions: undefined, }, ], @@ -6599,7 +6599,7 @@ const tests = { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching', + 'Learn more about data fetching with Hooks: https://reactjs.org/docs/hooks-faq.html#how-can-i-do-data-fetching-with-hooks', suggestions: undefined, }, ], diff --git a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js index 9e344e8662d6d..94171bd225449 100644 --- a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js +++ b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js @@ -258,7 +258,7 @@ export default { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching', + 'Learn more about data fetching with Hooks: https://reactjs.org/docs/hooks-faq.html#how-can-i-do-data-fetching-with-hooks', }); } diff --git a/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js b/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js index 49786ddfd8ac2..e7a81ee3a97b6 100644 --- a/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js +++ b/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js @@ -284,7 +284,7 @@ describe('ReactHooksInspection', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); expect(getterCalls).toBe(1); diff --git a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js index 7bffd1d809658..26debf771c730 100644 --- a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js +++ b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js @@ -787,7 +787,7 @@ describe('ReactHooksInspectionIntegration', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); expect(getterCalls).toBe(1); diff --git a/packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js b/packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js index 932c906cc7c05..bf53d33507f92 100644 --- a/packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js +++ b/packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js @@ -24,7 +24,7 @@ export default function NoInteractions({

Learn more about the interaction tracing API here. diff --git a/packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js b/packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js index 2756ba0c9f832..4b02bc1975435 100644 --- a/packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js +++ b/packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js @@ -176,7 +176,7 @@ const ProfilingNotSupported = () => ( Learn more at{' '} fb.me/react-profiling diff --git a/packages/react-devtools-shared/src/hook.js b/packages/react-devtools-shared/src/hook.js index 4b018e61421b1..d359fd5a68b65 100644 --- a/packages/react-devtools-shared/src/hook.js +++ b/packages/react-devtools-shared/src/hook.js @@ -145,7 +145,7 @@ export function installHook(target: any): DevToolsHook | null { 'React is running in production mode, but dead code ' + 'elimination has not been applied. Read how to correctly ' + 'configure React for production: ' + - 'https://fb.me/react-perf-use-the-production-build', + 'https://reactjs.org/docs/optimizing-performance.html#use-the-production-build', ); }); } diff --git a/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js b/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js index 939b7b77203ec..54049c3c9a01e 100644 --- a/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js +++ b/packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js @@ -801,7 +801,7 @@ describe('ReactComponentLifeCycle', () => { ' UNSAFE_componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev( [ @@ -827,7 +827,7 @@ describe('ReactComponentLifeCycle', () => { 'WillMount uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' + ' UNSAFE_componentWillMount\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); class WillMountAndUpdate extends React.Component { @@ -851,7 +851,7 @@ describe('ReactComponentLifeCycle', () => { ' componentWillMount\n' + ' UNSAFE_componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev(['componentWillMount has been renamed'], { withoutStack: true, @@ -874,7 +874,7 @@ describe('ReactComponentLifeCycle', () => { 'WillReceiveProps uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' + ' componentWillReceiveProps\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev(['componentWillReceiveProps has been renamed'], { withoutStack: true, @@ -906,7 +906,7 @@ describe('ReactComponentLifeCycle', () => { ' UNSAFE_componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev( [ @@ -931,7 +931,7 @@ describe('ReactComponentLifeCycle', () => { 'WillMount uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' + ' UNSAFE_componentWillMount\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); class WillMountAndUpdate extends React.Component { @@ -954,7 +954,7 @@ describe('ReactComponentLifeCycle', () => { ' componentWillMount\n' + ' UNSAFE_componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev(['componentWillMount has been renamed'], { withoutStack: true, @@ -976,7 +976,7 @@ describe('ReactComponentLifeCycle', () => { 'WillReceiveProps uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' + ' componentWillReceiveProps\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev(['componentWillReceiveProps has been renamed'], { withoutStack: true, @@ -1383,20 +1383,20 @@ describe('ReactComponentLifeCycle', () => { expect(() => ReactDOM.render(, container)).toWarnDev( [ /* eslint-disable max-len */ - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: MyComponent`, - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: MyComponent`, - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. diff --git a/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js b/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js index efd01b41af73a..caeff39bc3cbb 100644 --- a/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMAttribute-test.js @@ -93,7 +93,8 @@ describe('ReactDOM unknown attribute', () => { expect(() => testUnknownAttributeRemoval(Symbol('foo'))).toErrorDev( 'Warning: Invalid value for prop `unknown` on

tag. Either remove it ' + 'from the element, or pass a string or number value to keep it ' + - 'in the DOM. For details, see https://fb.me/react-attribute-behavior\n' + + 'in the DOM. For details, see ' + + 'https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html#changes-in-detail\n' + ' in div (at **)', ); }); @@ -105,7 +106,7 @@ describe('ReactDOM unknown attribute', () => { 'Warning: Invalid value for prop `unknown` on
tag. Either remove ' + 'it from the element, or pass a string or number value to ' + 'keep it in the DOM. For details, see ' + - 'https://fb.me/react-attribute-behavior\n' + + 'https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html#changes-in-detail\n' + ' in div (at **)', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js index 3c8ce165ebb90..0538adf70bd04 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js @@ -150,7 +150,7 @@ describe('ReactDOMComponent', () => { ).toErrorDev( 'Warning: Invalid value for prop `foo` on
tag. Either remove it ' + 'from the element, or pass a string or number value to keep ' + - 'it in the DOM. For details, see https://fb.me/react-attribute-behavior' + + 'it in the DOM. For details, see https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html#changes-in-detail' + '\n in div (at **)', ); }); @@ -162,7 +162,7 @@ describe('ReactDOMComponent', () => { ).toErrorDev( 'Warning: Invalid values for props `foo`, `baz` on
tag. Either remove ' + 'them from the element, or pass a string or number value to keep ' + - 'them in the DOM. For details, see https://fb.me/react-attribute-behavior' + + 'them in the DOM. For details, see https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html#changes-in-detail' + '\n in div (at **)', ); }); @@ -1384,7 +1384,7 @@ describe('ReactDOMComponent', () => { mountComponent({dangerouslySetInnerHTML: 'Hi Jim!'}); }).toThrowError( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + 'Please visit https://reactjs.org/docs/dom-elements for more information.', ); }); @@ -1393,7 +1393,7 @@ describe('ReactDOMComponent', () => { mountComponent({dangerouslySetInnerHTML: {foo: 'bar'}}); }).toThrowError( '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + 'Please visit https://reactjs.org/docs/dom-elements for more information.', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js b/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js index 218c2a81c066c..0906e9435a6db 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js @@ -183,7 +183,7 @@ describe('ReactDOMComponentTree', () => { 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMInput-test.js b/packages/react-dom/src/__tests__/ReactDOMInput-test.js index f78e11830e4df..d7670ca9c06b1 100644 --- a/packages/react-dom/src/__tests__/ReactDOMInput-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMInput-test.js @@ -1228,7 +1228,7 @@ describe('ReactDOMInput', () => { '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); ReactDOM.unmountComponentAtNode(container); @@ -1255,7 +1255,7 @@ describe('ReactDOMInput', () => { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); ReactDOM.unmountComponentAtNode(container); @@ -1275,7 +1275,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1294,7 +1294,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ]); }); @@ -1314,7 +1314,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1329,7 +1329,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1347,7 +1347,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1364,7 +1364,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1381,7 +1381,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1401,7 +1401,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1416,7 +1416,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1431,7 +1431,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1444,7 +1444,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1459,7 +1459,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1474,7 +1474,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1489,7 +1489,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1504,7 +1504,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); @@ -1557,7 +1557,7 @@ describe('ReactDOMInput', () => { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' + + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components\n' + ' in input (at **)', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js b/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js index 7263aac40529e..8a2d03a4e913b 100644 --- a/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js @@ -31,7 +31,7 @@ describe('ReactDOMInvalidARIAHook', () => { it('should warn for one invalid aria-* prop', () => { expect(() => mountComponent({'aria-badprop': 'maybe'})).toErrorDev( 'Warning: Invalid aria prop `aria-badprop` on
tag. ' + - 'For details, see https://fb.me/invalid-aria-prop', + 'For details, see https://reactjs.org/warnings/invalid-aria-prop', ); }); it('should warn for many invalid aria-* props', () => { @@ -42,7 +42,7 @@ describe('ReactDOMInvalidARIAHook', () => { }), ).toErrorDev( 'Warning: Invalid aria props `aria-badprop`, `aria-malprop` on
' + - 'tag. For details, see https://fb.me/invalid-aria-prop', + 'tag. For details, see https://reactjs.org/warnings/invalid-aria-prop', ); }); it('should warn for an improperly cased aria-* prop', () => { diff --git a/packages/react-dom/src/__tests__/ReactDOMSelect-test.js b/packages/react-dom/src/__tests__/ReactDOMSelect-test.js index 61315f0a95fd5..b58c0d6eb78ad 100644 --- a/packages/react-dom/src/__tests__/ReactDOMSelect-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMSelect-test.js @@ -693,7 +693,7 @@ describe('ReactDOMSelect', () => { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); ReactTestUtils.renderIntoDocument( diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js index 813c0fe1e7ad1..4aed971b27df5 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js @@ -156,7 +156,7 @@ describe('ReactDOMServerHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); itRenders('multiple times when an updater is called', async render => { @@ -674,7 +674,7 @@ describe('ReactDOMServerHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); }); diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationUntrustedURL-test.internal.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationUntrustedURL-test.internal.js index 0148249bd10f4..9fb48b3bce24c 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationUntrustedURL-test.internal.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationUntrustedURL-test.internal.js @@ -250,7 +250,7 @@ describe('ReactDOMServerIntegration - Untrusted URLs - disableJavaScriptURLs', ( // the first times it is called and then becomes dangerous. toStringCalls++; if (toStringCalls <= expectedToStringCalls) { - return 'https://fb.me/'; + return 'https://reactjs.org/'; } return 'javascript:notfine'; }, @@ -258,7 +258,7 @@ describe('ReactDOMServerIntegration - Untrusted URLs - disableJavaScriptURLs', ( const e = await render(); expect(toStringCalls).toBe(expectedToStringCalls); - expect(e.href).toBe('https://fb.me/'); + expect(e.href).toBe('https://reactjs.org/'); }); it('rejects a javascript protocol href if it is added during an update twice', () => { diff --git a/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js b/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js index 377ced34db988..e955e62ce791f 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerLifecycles-test.js @@ -293,7 +293,7 @@ describe('ReactDOMServerLifecycles', () => { } expect(() => ReactDOMServer.renderToString()).toWarnDev( - 'componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\n\n' + 'Please update the following components: MyComponent', ); diff --git a/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js b/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js index 92d1142f5b186..5e76bbe3e1a09 100644 --- a/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMTextarea-test.js @@ -525,7 +525,7 @@ describe('ReactDOMTextarea', () => { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); // No additional warnings are expected diff --git a/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.internal.js b/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.internal.js index 5ccbd7e481e4b..c7e51c847bb0b 100644 --- a/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.internal.js +++ b/packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.internal.js @@ -69,7 +69,7 @@ describe('ReactDeprecationWarnings', () => { 'Support for string refs will be removed in a future major release. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref' + + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs' + '\n in Component (at **)', ); }); @@ -110,7 +110,7 @@ describe('ReactDeprecationWarnings', () => { 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', ]); }); @@ -141,7 +141,7 @@ describe('ReactDeprecationWarnings', () => { 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', ); }); } diff --git a/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js b/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js index c80a05c2113be..2d70f00390dab 100644 --- a/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactFunctionComponent-test.js @@ -167,7 +167,7 @@ describe('ReactFunctionComponent', () => { '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://fb.me/react-refs-must-have-owner for more information.', + 'See https://reactjs.org/warnings/refs-must-have-ownerfor more information.', ); }); diff --git a/packages/react-dom/src/__tests__/ReactTestUtils-test.js b/packages/react-dom/src/__tests__/ReactTestUtils-test.js index 20940d7523e50..349b510034f95 100644 --- a/packages/react-dom/src/__tests__/ReactTestUtils-test.js +++ b/packages/react-dom/src/__tests__/ReactTestUtils-test.js @@ -46,7 +46,7 @@ describe('ReactTestUtils', () => { ).toWarnDev( 'ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + - 'See https://fb.me/test-utils-mock-component for more information.', + 'See https://gist.github.com/bvaughn/fbf41b3f895bf2d297935faa5525eee9 for more information.', {withoutStack: true}, ); diff --git a/packages/react-dom/src/__tests__/findDOMNode-test.js b/packages/react-dom/src/__tests__/findDOMNode-test.js index 9aaa65088e6c4..7809b9c946c6d 100644 --- a/packages/react-dom/src/__tests__/findDOMNode-test.js +++ b/packages/react-dom/src/__tests__/findDOMNode-test.js @@ -122,7 +122,7 @@ describe('findDOMNode', () => { 'findDOMNode was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in div (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -151,7 +151,7 @@ describe('findDOMNode', () => { 'findDOMNode was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in div (at **)' + '\n in IsInStrictMode (at **)', ]); diff --git a/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js b/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js index 280af615cdf78..6282c5afaad88 100644 --- a/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js +++ b/packages/react-dom/src/__tests__/multiple-copies-of-react-test.js @@ -30,7 +30,7 @@ describe('when different React version is used with string ref', () => { '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://fb.me/react-refs-must-have-owner for more information.', + 'See https://reactjs.org/warnings/refs-must-have-ownerfor more information.', ); }); }); diff --git a/packages/react-dom/src/__tests__/refs-test.js b/packages/react-dom/src/__tests__/refs-test.js index 972e454e398c8..aeb67bf225d54 100644 --- a/packages/react-dom/src/__tests__/refs-test.js +++ b/packages/react-dom/src/__tests__/refs-test.js @@ -458,7 +458,7 @@ describe('creating element with ref in constructor', () => { '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://fb.me/react-refs-must-have-owner for more information.', + 'See https://reactjs.org/warnings/refs-must-have-ownerfor more information.', ); }); }); diff --git a/packages/react-dom/src/client/ReactDOM.js b/packages/react-dom/src/client/ReactDOM.js index a0861bc5d6a0a..d3af3fc53e6e8 100644 --- a/packages/react-dom/src/client/ReactDOM.js +++ b/packages/react-dom/src/client/ReactDOM.js @@ -94,7 +94,7 @@ if (__DEV__) { ) { console.error( 'React depends on Map and Set built-in types. Make sure that you load a ' + - 'polyfill in older browsers. https://fb.me/react-polyfills', + 'polyfill in older browsers. https://reactjs.org/docs/javascript-environment-requirements', ); } } @@ -238,10 +238,10 @@ if (__DEV__) { console.info( '%cDownload the React DevTools ' + 'for a better development experience: ' + - 'https://fb.me/react-devtools' + + 'https://reactjs.org/blog/2015/09/02/new-react-developer-tools.html#installation' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + - 'https://fb.me/react-devtools-faq' + 'https://github.com/facebook/react/tree/master/packages/react-devtools#faq' : ''), 'font-weight:bold', ); diff --git a/packages/react-dom/src/client/ReactDOMInput.js b/packages/react-dom/src/client/ReactDOMInput.js index e503b75a95469..4985016f3afb7 100644 --- a/packages/react-dom/src/client/ReactDOMInput.js +++ b/packages/react-dom/src/client/ReactDOMInput.js @@ -86,7 +86,7 @@ export function initWrapperState(element: Element, props: Object) { '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type, ); @@ -103,7 +103,7 @@ export function initWrapperState(element: Element, props: Object) { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type, ); @@ -147,7 +147,7 @@ export function updateWrapper(element: Element, props: Object) { 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components', ); didWarnUncontrolledToControlled = true; } @@ -161,7 +161,7 @@ export function updateWrapper(element: Element, props: Object) { 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + - 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + 'element for the lifetime of the component. More info: https://reactjs.org/docs/forms.html#controlled-components', ); didWarnControlledToUncontrolled = true; } diff --git a/packages/react-dom/src/client/ReactDOMSelect.js b/packages/react-dom/src/client/ReactDOMSelect.js index d97e01be0ab60..281c8db7d36d6 100644 --- a/packages/react-dom/src/client/ReactDOMSelect.js +++ b/packages/react-dom/src/client/ReactDOMSelect.js @@ -159,7 +159,7 @@ export function initWrapperState(element: Element, props: Object) { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); didWarnValueDefaultValue = true; } diff --git a/packages/react-dom/src/client/ReactDOMTextarea.js b/packages/react-dom/src/client/ReactDOMTextarea.js index a37c36b94efd8..94833a1c71702 100644 --- a/packages/react-dom/src/client/ReactDOMTextarea.js +++ b/packages/react-dom/src/client/ReactDOMTextarea.js @@ -76,7 +76,7 @@ export function initWrapperState(element: Element, props: Object) { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', ); didWarnValDefaultVal = true; diff --git a/packages/react-dom/src/server/ReactPartialRenderer.js b/packages/react-dom/src/server/ReactPartialRenderer.js index 1754555dd5493..8356b1aa13b6b 100644 --- a/packages/react-dom/src/server/ReactPartialRenderer.js +++ b/packages/react-dom/src/server/ReactPartialRenderer.js @@ -591,7 +591,7 @@ function resolve( console.warn( // keep this warning in sync with ReactStrictModeWarning.js 'componentWillMount has been renamed, and is not recommended for use. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', @@ -1398,7 +1398,7 @@ class ReactDOMServerRenderer { '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', 'A component', props.type, ); @@ -1415,7 +1415,7 @@ class ReactDOMServerRenderer { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', 'A component', props.type, ); @@ -1448,7 +1448,7 @@ class ReactDOMServerRenderer { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); didWarnDefaultTextareaValue = true; } @@ -1525,7 +1525,7 @@ class ReactDOMServerRenderer { '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + - 'https://fb.me/react-controlled-components', + 'https://reactjs.org/docs/forms.html#controlled-components', ); didWarnDefaultSelectValue = true; } diff --git a/packages/react-dom/src/server/ReactPartialRendererHooks.js b/packages/react-dom/src/server/ReactPartialRendererHooks.js index 8cc7be4716205..5fd61ffda1cd6 100644 --- a/packages/react-dom/src/server/ReactPartialRendererHooks.js +++ b/packages/react-dom/src/server/ReactPartialRendererHooks.js @@ -74,7 +74,7 @@ function resolveCurrentlyRenderingComponent(): Object { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); if (__DEV__) { if (isInHookUserCodeInDev) { @@ -82,7 +82,7 @@ function resolveCurrentlyRenderingComponent(): Object { 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + - 'https://fb.me/rules-of-hooks', + 'https://reactjs.org/docs/hooks-rules', ); } } @@ -403,7 +403,7 @@ export function useLayoutEffect( 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + - 'See https://fb.me/react-uselayouteffect-ssr for common fixes.', + 'See https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85 for common fixes.', ); } } diff --git a/packages/react-dom/src/shared/ReactDOMInvalidARIAHook.js b/packages/react-dom/src/shared/ReactDOMInvalidARIAHook.js index cceea9758c57f..639ae0b8d6068 100644 --- a/packages/react-dom/src/shared/ReactDOMInvalidARIAHook.js +++ b/packages/react-dom/src/shared/ReactDOMInvalidARIAHook.js @@ -95,14 +95,14 @@ function warnInvalidARIAProps(type, props) { if (invalidProps.length === 1) { console.error( 'Invalid aria prop %s on <%s> tag. ' + - 'For details, see https://fb.me/invalid-aria-prop', + 'For details, see https://reactjs.org/warnings/invalid-aria-prop', unknownPropString, type, ); } else if (invalidProps.length > 1) { console.error( 'Invalid aria props %s on <%s> tag. ' + - 'For details, see https://fb.me/invalid-aria-prop', + 'For details, see https://reactjs.org/warnings/invalid-aria-prop', unknownPropString, type, ); diff --git a/packages/react-dom/src/shared/ReactDOMUnknownPropertyHook.js b/packages/react-dom/src/shared/ReactDOMUnknownPropertyHook.js index 8069f7cb185ab..60015b608f831 100644 --- a/packages/react-dom/src/shared/ReactDOMUnknownPropertyHook.js +++ b/packages/react-dom/src/shared/ReactDOMUnknownPropertyHook.js @@ -256,7 +256,7 @@ const warnUnknownProperties = function(type, props, eventRegistry) { console.error( 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + - 'For details, see https://fb.me/react-attribute-behavior', + 'For details, see https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html#changes-in-detail', unknownPropString, type, ); @@ -264,7 +264,7 @@ const warnUnknownProperties = function(type, props, eventRegistry) { console.error( 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + - 'For details, see https://fb.me/react-attribute-behavior', + 'For details, see https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html#changes-in-detail', unknownPropString, type, ); diff --git a/packages/react-dom/src/shared/assertValidProps.js b/packages/react-dom/src/shared/assertValidProps.js index b944c7956b397..3a92d30a99818 100644 --- a/packages/react-dom/src/shared/assertValidProps.js +++ b/packages/react-dom/src/shared/assertValidProps.js @@ -33,7 +33,7 @@ function assertValidProps(tag: string, props: ?Object) { typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + + 'Please visit https://reactjs.org/docs/dom-elements ' + 'for more information.', ); } diff --git a/packages/react-dom/src/test-utils/ReactTestUtils.js b/packages/react-dom/src/test-utils/ReactTestUtils.js index 52ad2621cdebc..9d954518e9d16 100644 --- a/packages/react-dom/src/test-utils/ReactTestUtils.js +++ b/packages/react-dom/src/test-utils/ReactTestUtils.js @@ -324,7 +324,7 @@ function mockComponent(module, mockTagName) { console.warn( 'ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + - 'See https://fb.me/test-utils-mock-component for more information.', + 'See https://gist.github.com/bvaughn/fbf41b3f895bf2d297935faa5525eee9 for more information.', ); } } diff --git a/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js b/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js index e1a6b07c2ead9..52d1fc3f9e605 100644 --- a/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js +++ b/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js @@ -771,7 +771,7 @@ describe('ReactFabric', () => { 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -808,7 +808,7 @@ describe('ReactFabric', () => { 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); @@ -842,7 +842,7 @@ describe('ReactFabric', () => { 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -877,7 +877,7 @@ describe('ReactFabric', () => { 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); diff --git a/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js b/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js index 3022b58333a45..1adf08c2fe4d4 100644 --- a/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js +++ b/packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js @@ -481,7 +481,7 @@ describe('ReactNative', () => { 'findHostInstance_DEPRECATED was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -518,7 +518,7 @@ describe('ReactNative', () => { 'findHostInstance_DEPRECATED was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); @@ -552,7 +552,7 @@ describe('ReactNative', () => { 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in ContainsStrictModeChild (at **)', ]); @@ -587,7 +587,7 @@ describe('ReactNative', () => { 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node' + + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage' + '\n in RCTView (at **)' + '\n in IsInStrictMode (at **)', ]); diff --git a/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js b/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js index b9e731aa2acdd..acac546e0ecd0 100644 --- a/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js +++ b/packages/react-native-renderer/src/legacy-events/SyntheticEvent.js @@ -289,7 +289,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) { "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + - 'See https://fb.me/react-event-pooling for more information.', + 'See https://reactjs.org/docs/events.html#event-pooling for more information.', action, propName, result, diff --git a/packages/react-reconciler/src/ReactChildFiber.new.js b/packages/react-reconciler/src/ReactChildFiber.new.js index 3bef3545fc3a2..68d0fe174b886 100644 --- a/packages/react-reconciler/src/ReactChildFiber.new.js +++ b/packages/react-reconciler/src/ReactChildFiber.new.js @@ -96,7 +96,7 @@ if (__DEV__) { console.error( 'Each child in a list should have a unique ' + - '"key" prop. See https://fb.me/react-warning-keys for ' + + '"key" prop. See https://reactjs.org/docs/lists-and-keys.html#keys for ' + 'more information.', ); }; @@ -137,7 +137,7 @@ function coerceRef( 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', componentName, mixedRef, ); @@ -147,7 +147,7 @@ function coerceRef( 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', mixedRef, ); } @@ -166,7 +166,7 @@ function coerceRef( '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', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', ); inst = ownerFiber.stateNode; } @@ -212,7 +212,7 @@ function coerceRef( '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://fb.me/react-refs-must-have-owner for more information.', + 'See https://reactjs.org/warnings/refs-must-have-ownerfor more information.', mixedRef, ); } diff --git a/packages/react-reconciler/src/ReactChildFiber.old.js b/packages/react-reconciler/src/ReactChildFiber.old.js index 6af9a6ab9fee2..05f01da0b7a69 100644 --- a/packages/react-reconciler/src/ReactChildFiber.old.js +++ b/packages/react-reconciler/src/ReactChildFiber.old.js @@ -96,7 +96,7 @@ if (__DEV__) { console.error( 'Each child in a list should have a unique ' + - '"key" prop. See https://fb.me/react-warning-keys for ' + + '"key" prop. See https://reactjs.org/docs/lists-and-keys.html#keys for ' + 'more information.', ); }; @@ -137,7 +137,7 @@ function coerceRef( 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', componentName, mixedRef, ); @@ -147,7 +147,7 @@ function coerceRef( 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', mixedRef, ); } @@ -166,7 +166,7 @@ function coerceRef( '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', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', ); inst = ownerFiber.stateNode; } @@ -212,7 +212,7 @@ function coerceRef( '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + - 'See https://fb.me/react-refs-must-have-owner for more information.', + 'See https://reactjs.org/warnings/refs-must-have-ownerfor more information.', mixedRef, ); } diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.new.js b/packages/react-reconciler/src/ReactFiberClassComponent.new.js index 5886d3f4cb807..ed7c262f6c2af 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.new.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.new.js @@ -729,7 +729,7 @@ function constructClassInstance( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', componentName, newApiName, foundWillMountName !== null ? `\n ${foundWillMountName}` : '', diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.old.js b/packages/react-reconciler/src/ReactFiberClassComponent.old.js index ed544db392fc3..2a9abadf09a18 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.old.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.old.js @@ -729,7 +729,7 @@ function constructClassInstance( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', componentName, newApiName, foundWillMountName !== null ? `\n ${foundWillMountName}` : '', diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.new.js b/packages/react-reconciler/src/ReactFiberCommitWork.new.js index 6fda9c97cd1f0..b9a9918ea2f5f 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.new.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.new.js @@ -361,7 +361,7 @@ function commitHookEffectListMount(tag: number, finishedWork: Fiber) { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching'; + 'Learn more about data fetching with Hooks: https://reactjs.org/docs/hooks-faq.html#how-can-i-do-data-fetching-with-hooks'; } else { addendum = ' You returned: ' + destroy; } diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.old.js b/packages/react-reconciler/src/ReactFiberCommitWork.old.js index 8e280e1600510..5d2d9e20ff612 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.old.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.old.js @@ -359,7 +359,7 @@ function commitHookEffectListMount(tag: number, finishedWork: Fiber) { ' }\n' + ' fetchData();\n' + `}, [someId]); // Or [] if effect doesn't need props or state\n\n` + - 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching'; + 'Learn more about data fetching with Hooks: https://reactjs.org/docs/hooks-faq.html#how-can-i-do-data-fetching-with-hooks'; } else { addendum = ' You returned: ' + destroy; } diff --git a/packages/react-reconciler/src/ReactFiberDevToolsHook.new.js b/packages/react-reconciler/src/ReactFiberDevToolsHook.new.js index cf1bb7a9cf9c7..ad02e26bb7ead 100644 --- a/packages/react-reconciler/src/ReactFiberDevToolsHook.new.js +++ b/packages/react-reconciler/src/ReactFiberDevToolsHook.new.js @@ -40,7 +40,7 @@ export function injectInternals(internals: Object): boolean { console.error( 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + - 'https://fb.me/react-devtools', + 'https://reactjs.org/blog/2015/09/02/new-react-developer-tools.html#installation', ); } // DevTools exists, even though it doesn't support Fiber. diff --git a/packages/react-reconciler/src/ReactFiberDevToolsHook.old.js b/packages/react-reconciler/src/ReactFiberDevToolsHook.old.js index cf1bb7a9cf9c7..ad02e26bb7ead 100644 --- a/packages/react-reconciler/src/ReactFiberDevToolsHook.old.js +++ b/packages/react-reconciler/src/ReactFiberDevToolsHook.old.js @@ -40,7 +40,7 @@ export function injectInternals(internals: Object): boolean { console.error( 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + - 'https://fb.me/react-devtools', + 'https://reactjs.org/blog/2015/09/02/new-react-developer-tools.html#installation', ); } // DevTools exists, even though it doesn't support Fiber. diff --git a/packages/react-reconciler/src/ReactFiberErrorLogger.js b/packages/react-reconciler/src/ReactFiberErrorLogger.js index 0f3cd24ab4b5a..6ad0fecb641ad 100644 --- a/packages/react-reconciler/src/ReactFiberErrorLogger.js +++ b/packages/react-reconciler/src/ReactFiberErrorLogger.js @@ -65,7 +65,7 @@ export function logCapturedError( } else { errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + - 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.'; + 'Visit https://reactjs.org/docs/error-boundaries to learn more about error boundaries.'; } const combinedMessage = `${componentNameMessage}\n${componentStack}\n\n` + diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index 99f367f606873..662971f7fb6cc 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -279,7 +279,7 @@ function warnOnHookMismatchInDev(currentHookName: HookType) { console.error( 'React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + - 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'For more information, read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + @@ -300,7 +300,7 @@ function throwInvalidHookError() { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); } @@ -1908,7 +1908,7 @@ if (__DEV__) { 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + - 'https://fb.me/rules-of-hooks', + 'https://reactjs.org/docs/hooks-rules', ); }; diff --git a/packages/react-reconciler/src/ReactFiberHooks.old.js b/packages/react-reconciler/src/ReactFiberHooks.old.js index 380524df9aad6..3b017c4830807 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.old.js +++ b/packages/react-reconciler/src/ReactFiberHooks.old.js @@ -278,7 +278,7 @@ function warnOnHookMismatchInDev(currentHookName: HookType) { console.error( 'React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + - 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'For more information, read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + @@ -299,7 +299,7 @@ function throwInvalidHookError() { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); } @@ -1906,7 +1906,7 @@ if (__DEV__) { 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + - 'https://fb.me/rules-of-hooks', + 'https://reactjs.org/docs/hooks-rules', ); }; diff --git a/packages/react-reconciler/src/ReactFiberReconciler.new.js b/packages/react-reconciler/src/ReactFiberReconciler.new.js index f2f1187319b82..abf6681904289 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.new.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.new.js @@ -206,7 +206,7 @@ function findHostInstanceWithWarning( '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node', + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage', methodName, methodName, componentName, @@ -217,7 +217,7 @@ function findHostInstanceWithWarning( '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node', + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage', methodName, methodName, componentName, diff --git a/packages/react-reconciler/src/ReactFiberReconciler.old.js b/packages/react-reconciler/src/ReactFiberReconciler.old.js index b272f6147ed55..af49b020c9075 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.old.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.old.js @@ -206,7 +206,7 @@ function findHostInstanceWithWarning( '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node', + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage', methodName, methodName, componentName, @@ -217,7 +217,7 @@ function findHostInstanceWithWarning( '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-find-node', + 'https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage', methodName, methodName, componentName, diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index 9cd162cb01cf0..3193654e49e52 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -3551,7 +3551,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) { console.error( 'Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + - 'follow the stack trace as described in https://fb.me/setstate-in-render', + 'follow the stack trace as described in https://github.com/facebook/react/issues/18178#issuecomment-595846312', setStateComponentName, renderingComponentName, renderingComponentName, @@ -3634,7 +3634,7 @@ export function warnIfNotCurrentlyActingEffectsInDEV(fiber: Fiber): void { '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + - ' Learn more at https://fb.me/react-wrap-tests-with-act', + ' Learn more at https://reactjs.org/docs/test-utils.html#act', getComponentName(fiber.type), ); } @@ -3662,7 +3662,7 @@ function warnIfNotCurrentlyActingUpdatesInDEV(fiber: Fiber): void { '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + - ' Learn more at https://fb.me/react-wrap-tests-with-act', + ' Learn more at https://reactjs.org/docs/test-utils.html#act', getComponentName(fiber.type), ); } finally { diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index 4cb6e5093377e..b1d5aacaf056c 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -3296,7 +3296,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) { console.error( 'Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + - 'follow the stack trace as described in https://fb.me/setstate-in-render', + 'follow the stack trace as described in https://github.com/facebook/react/issues/18178#issuecomment-595846312', setStateComponentName, renderingComponentName, renderingComponentName, @@ -3379,7 +3379,7 @@ export function warnIfNotCurrentlyActingEffectsInDEV(fiber: Fiber): void { '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + - ' Learn more at https://fb.me/react-wrap-tests-with-act', + ' Learn more at https://reactjs.org/docs/test-utils.html#act', getComponentName(fiber.type), ); } @@ -3407,7 +3407,7 @@ function warnIfNotCurrentlyActingUpdatesInDEV(fiber: Fiber): void { '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + - ' Learn more at https://fb.me/react-wrap-tests-with-act', + ' Learn more at https://reactjs.org/docs/test-utils.html#act', getComponentName(fiber.type), ); } finally { diff --git a/packages/react-reconciler/src/ReactStrictModeWarnings.new.js b/packages/react-reconciler/src/ReactStrictModeWarnings.new.js index 14ab8db576e62..4d8b756d500d6 100644 --- a/packages/react-reconciler/src/ReactStrictModeWarnings.new.js +++ b/packages/react-reconciler/src/ReactStrictModeWarnings.new.js @@ -193,7 +193,7 @@ if (__DEV__) { ); console.error( 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames, @@ -207,11 +207,11 @@ if (__DEV__) { console.error( 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + - 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state\n' + '\nPlease update the following components: %s', sortedNames, ); @@ -224,7 +224,7 @@ if (__DEV__) { console.error( 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', sortedNames, @@ -236,7 +236,7 @@ if (__DEV__) { console.warn( 'componentWillMount has been renamed, and is not recommended for use. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + @@ -254,11 +254,11 @@ if (__DEV__) { console.warn( 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + - 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + @@ -273,7 +273,7 @@ if (__DEV__) { console.warn( 'componentWillUpdate has been renamed, and is not recommended for use. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + @@ -346,7 +346,7 @@ if (__DEV__) { '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + - '\n\nLearn more about this warning here: https://fb.me/react-legacy-context', + '\n\nLearn more about this warning here: https://reactjs.org/docs/context.html#legacy-api', sortedNames, ); } finally { diff --git a/packages/react-reconciler/src/ReactStrictModeWarnings.old.js b/packages/react-reconciler/src/ReactStrictModeWarnings.old.js index 15d86a73b4b78..0c707c40da3bc 100644 --- a/packages/react-reconciler/src/ReactStrictModeWarnings.old.js +++ b/packages/react-reconciler/src/ReactStrictModeWarnings.old.js @@ -193,7 +193,7 @@ if (__DEV__) { ); console.error( 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames, @@ -207,11 +207,11 @@ if (__DEV__) { console.error( 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + - 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state\n' + '\nPlease update the following components: %s', sortedNames, ); @@ -224,7 +224,7 @@ if (__DEV__) { console.error( 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', sortedNames, @@ -236,7 +236,7 @@ if (__DEV__) { console.warn( 'componentWillMount has been renamed, and is not recommended for use. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + @@ -254,11 +254,11 @@ if (__DEV__) { console.warn( 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + - 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + @@ -273,7 +273,7 @@ if (__DEV__) { console.warn( 'componentWillUpdate has been renamed, and is not recommended for use. ' + - 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + 'See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + @@ -346,7 +346,7 @@ if (__DEV__) { '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + - '\n\nLearn more about this warning here: https://fb.me/react-legacy-context', + '\n\nLearn more about this warning here: https://reactjs.org/docs/context.html#legacy-api', sortedNames, ); } finally { diff --git a/packages/react-reconciler/src/SchedulerWithReactIntegration.new.js b/packages/react-reconciler/src/SchedulerWithReactIntegration.new.js index 18e4ba82ab36c..fbc3b9f3dc32a 100644 --- a/packages/react-reconciler/src/SchedulerWithReactIntegration.new.js +++ b/packages/react-reconciler/src/SchedulerWithReactIntegration.new.js @@ -49,7 +49,7 @@ if (enableSchedulerTracing) { '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', + 'https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977', ); } diff --git a/packages/react-reconciler/src/SchedulerWithReactIntegration.old.js b/packages/react-reconciler/src/SchedulerWithReactIntegration.old.js index 18e4ba82ab36c..fbc3b9f3dc32a 100644 --- a/packages/react-reconciler/src/SchedulerWithReactIntegration.old.js +++ b/packages/react-reconciler/src/SchedulerWithReactIntegration.old.js @@ -49,7 +49,7 @@ if (enableSchedulerTracing) { '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', + 'https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977', ); } diff --git a/packages/react-reconciler/src/__tests__/ReactBlocks-test.js b/packages/react-reconciler/src/__tests__/ReactBlocks-test.js index 06662e63f3ebd..77399b71856f8 100644 --- a/packages/react-reconciler/src/__tests__/ReactBlocks-test.js +++ b/packages/react-reconciler/src/__tests__/ReactBlocks-test.js @@ -102,7 +102,7 @@ describe('ReactBlocks', () => { }).toErrorDev( 'Warning: Each child in a list should have a unique ' + '"key" prop.\n\nCheck the render method of `User`. See ' + - 'https://fb.me/react-warning-keys for more information.\n' + + 'https://reactjs.org/docs/lists-and-keys.html#keys for more information.\n' + ' in span (at **)\n' + ' in User (at **)\n' + ' in Suspense (at **)\n' + diff --git a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js index 129a83f639c81..f141a9eacbef0 100644 --- a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js @@ -51,7 +51,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); }); } @@ -906,7 +906,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); // the next round, it does a fresh mount, so should render expect(() => root.update()).not.toThrow( @@ -915,7 +915,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); // and then again, fail expect(() => root.update()).toThrow( @@ -924,7 +924,7 @@ describe('ReactHooks', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); }); @@ -1115,7 +1115,7 @@ describe('ReactHooks', () => { 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks', 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useReducer useReducer\n' + @@ -1573,7 +1573,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameB)}\n` + @@ -1624,7 +1624,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + `1. ${formatHookNamesToMatchErrorMessage(hookNameA, hookNameA)}\n` + @@ -1704,7 +1704,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + `1. ${formatHookNamesToMatchErrorMessage( @@ -1746,7 +1746,7 @@ describe('ReactHooks', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useReducer useState\n' + diff --git a/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js b/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js index eaa222456fc66..08b51fd9e4c93 100644 --- a/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js +++ b/packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js @@ -162,7 +162,7 @@ describe('ReactHooksWithNoopRenderer', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); // Confirm that a subsequent hook works properly. @@ -192,7 +192,7 @@ describe('ReactHooksWithNoopRenderer', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ), ).toErrorDev( 'Warning: The component appears to be a function component that returns a class instance. ' + @@ -219,7 +219,7 @@ describe('ReactHooksWithNoopRenderer', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); }); @@ -3124,7 +3124,7 @@ describe('ReactHooksWithNoopRenderer', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useState useState\n' + @@ -3220,7 +3220,7 @@ describe('ReactHooksWithNoopRenderer', () => { }).toErrorDev([ 'Warning: React has detected a change in the order of Hooks called by App. ' + 'This will lead to bugs and errors if not fixed. For more information, ' + - 'read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + 'read the Rules of Hooks: https://reactjs.org/docs/hooks-rules\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '1. useEffect useEffect\n' + diff --git a/packages/react-reconciler/src/__tests__/ReactNewContext-test.js b/packages/react-reconciler/src/__tests__/ReactNewContext-test.js index d0d6e4426f0f2..463b5d85410ae 100644 --- a/packages/react-reconciler/src/__tests__/ReactNewContext-test.js +++ b/packages/react-reconciler/src/__tests__/ReactNewContext-test.js @@ -1525,7 +1525,7 @@ describe('ReactNewContext', () => { 'You passed: 0.\n\n' + 'Did you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + - 'Learn more at https://fb.me/rules-of-hooks', + 'Learn more at https://reactjs.org/docs/hooks-rules', ); }); @@ -1543,7 +1543,7 @@ describe('ReactNewContext', () => { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); }); diff --git a/packages/react-reconciler/src/__tests__/ReactTracing-test.internal.js b/packages/react-reconciler/src/__tests__/ReactTracing-test.internal.js index 2f45ad48caf90..41bc72af67b2a 100644 --- a/packages/react-reconciler/src/__tests__/ReactTracing-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactTracing-test.internal.js @@ -22,7 +22,7 @@ describe('ReactTracing', () => { ReactFeatureFlags.enableSchedulerTracing = true; expect(() => require('react-dom')).toThrow( - 'Learn more at http://fb.me/react-profiling', + 'Learn more at https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977', ); }); }); diff --git a/packages/react/src/ReactElement.js b/packages/react/src/ReactElement.js index fc2302e7fde10..0d25bf9a4ee39 100644 --- a/packages/react/src/ReactElement.js +++ b/packages/react/src/ReactElement.js @@ -61,7 +61,7 @@ function defineKeyPropWarningGetter(props, displayName) { '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', displayName, ); } @@ -83,7 +83,7 @@ function defineRefPropWarningGetter(props, displayName) { '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', displayName, ); } @@ -113,7 +113,7 @@ function warnIfStringRefCannotBeAutoConverted(config) { 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', componentName, config.ref, ); diff --git a/packages/react/src/ReactElementValidator.js b/packages/react/src/ReactElementValidator.js index 16c5d91184891..5f2bf9afd8a27 100644 --- a/packages/react/src/ReactElementValidator.js +++ b/packages/react/src/ReactElementValidator.js @@ -148,7 +148,7 @@ function validateExplicitKey(element, parentType) { setCurrentlyValidatingElement(element); console.error( 'Each child in a list should have a unique "key" prop.' + - '%s%s See https://fb.me/react-warning-keys for more information.', + '%s%s See https://reactjs.org/docs/lists-and-keys.html#keys for more information.', currentComponentErrorInfo, childOwner, ); diff --git a/packages/react/src/ReactHooks.js b/packages/react/src/ReactHooks.js index 703bafacb9194..3ca826ac5adeb 100644 --- a/packages/react/src/ReactHooks.js +++ b/packages/react/src/ReactHooks.js @@ -31,7 +31,7 @@ function resolveDispatcher() { '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + 'See https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.', ); return dispatcher; } @@ -51,7 +51,7 @@ export function useContext( typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + - 'Learn more at https://fb.me/rules-of-hooks' + 'Learn more at https://reactjs.org/docs/hooks-rules' : '', ); } diff --git a/packages/react/src/__tests__/ReactChildren-test.js b/packages/react/src/__tests__/ReactChildren-test.js index bb9aa9c815dcd..727795f25bdf0 100644 --- a/packages/react/src/__tests__/ReactChildren-test.js +++ b/packages/react/src/__tests__/ReactChildren-test.js @@ -974,7 +974,7 @@ describe('ReactChildren', () => { ).toErrorDev( 'Warning: ' + 'Each child in a list should have a unique "key" prop.' + - ' See https://fb.me/react-warning-keys for more information.' + + ' See https://reactjs.org/docs/lists-and-keys.html#keys for more information.' + '\n in ComponentReturningArray (at **)', ); }); @@ -995,7 +995,7 @@ describe('ReactChildren', () => { ).toErrorDev( 'Warning: ' + 'Each child in a list should have a unique "key" prop.' + - ' See https://fb.me/react-warning-keys for more information.', + ' See https://reactjs.org/docs/lists-and-keys.html#keys for more information.', {withoutStack: true}, // There's nothing on the stack ); }); diff --git a/packages/react/src/__tests__/ReactElement-test.js b/packages/react/src/__tests__/ReactElement-test.js index 6c3d4f6cebae0..74ee79065290f 100644 --- a/packages/react/src/__tests__/ReactElement-test.js +++ b/packages/react/src/__tests__/ReactElement-test.js @@ -79,7 +79,7 @@ describe('ReactElement', () => { 'Child: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', ); }); @@ -91,7 +91,7 @@ describe('ReactElement', () => { 'div: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', {withoutStack: true}, ); }); @@ -116,7 +116,7 @@ describe('ReactElement', () => { 'Child: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', ); }); diff --git a/packages/react/src/__tests__/ReactElementJSX-test.js b/packages/react/src/__tests__/ReactElementJSX-test.js index fbf9cc7a3ca27..a5cd37e0d42f7 100644 --- a/packages/react/src/__tests__/ReactElementJSX-test.js +++ b/packages/react/src/__tests__/ReactElementJSX-test.js @@ -231,7 +231,7 @@ describe('ReactElement.jsx', () => { 'Child: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', ); }); @@ -258,7 +258,7 @@ describe('ReactElement.jsx', () => { 'div: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', {withoutStack: true}, ); }); @@ -283,7 +283,7 @@ describe('ReactElement.jsx', () => { 'Child: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', ); }); @@ -363,7 +363,7 @@ describe('ReactElement.jsx', () => { ReactDOM.render(JSXRuntime.jsx(Parent, {}), container), ).toErrorDev( 'Warning: Each child in a list should have a unique "key" prop.\n\n' + - 'Check the render method of `Parent`. See https://fb.me/react-warning-keys for more information.\n' + + 'Check the render method of `Parent`. See https://reactjs.org/docs/lists-and-keys.html#keys for more information.\n' + ' in Child (at **)\n' + ' in Parent (at **)', ); diff --git a/packages/react/src/__tests__/ReactElementValidator-test.internal.js b/packages/react/src/__tests__/ReactElementValidator-test.internal.js index c8209952c1cc3..0e1517d0f62e4 100644 --- a/packages/react/src/__tests__/ReactElementValidator-test.internal.js +++ b/packages/react/src/__tests__/ReactElementValidator-test.internal.js @@ -86,7 +86,7 @@ describe('ReactElementValidator', () => { ReactTestUtils.renderIntoDocument({divs}); }).toErrorDev( 'Warning: Each child in a list should have a unique ' + - '"key" prop. See https://fb.me/react-warning-keys for more information.\n' + + '"key" prop. See https://reactjs.org/docs/lists-and-keys.html#keys for more information.\n' + ' in div (at **)', ); }); @@ -99,7 +99,7 @@ describe('ReactElementValidator', () => { }).toErrorDev( 'Warning: Each child in a list should have a unique ' + '"key" prop.\n\nCheck the top-level render call using
. See ' + - 'https://fb.me/react-warning-keys for more information.\n' + + 'https://reactjs.org/docs/lists-and-keys.html#keys for more information.\n' + ' in div (at **)', ); }); @@ -120,7 +120,7 @@ describe('ReactElementValidator', () => { expect(() => ReactTestUtils.renderIntoDocument()).toErrorDev( 'Warning: Each child in a list should have a unique ' + '"key" prop.\n\nCheck the render method of `Component`. See ' + - 'https://fb.me/react-warning-keys for more information.\n' + + 'https://reactjs.org/docs/lists-and-keys.html#keys for more information.\n' + ' in div (at **)\n' + ' in Component (at **)\n' + ' in Parent (at **)\n' + diff --git a/packages/react/src/__tests__/ReactStrictMode-test.js b/packages/react/src/__tests__/ReactStrictMode-test.js index 055b71d8c7ff5..d87805b0de018 100644 --- a/packages/react/src/__tests__/ReactStrictMode-test.js +++ b/packages/react/src/__tests__/ReactStrictMode-test.js @@ -403,18 +403,18 @@ describe('Concurrent Mode', () => { expect(() => Scheduler.unstable_flushAll()).toErrorDev( [ /* eslint-disable max-len */ - `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. + `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. Please update the following components: AsyncRoot`, - `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. + `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state Please update the following components: Bar, Foo`, - `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. @@ -461,18 +461,18 @@ Please update the following components: AsyncRoot`, expect(() => Scheduler.unstable_flushAll()).toErrorDev( [ /* eslint-disable max-len */ - `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. + `Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. Please update the following components: AsyncRoot`, - `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. + `Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state Please update the following components: Child`, - `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. @@ -484,20 +484,20 @@ Please update the following components: AsyncRoot`, }).toWarnDev( [ /* eslint-disable max-len */ - `Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: Parent`, - `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state +* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. Please update the following components: Parent`, - `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. + `Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering for details. * Move data fetching code or side effects to componentDidUpdate. * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. @@ -753,7 +753,7 @@ describe('string refs', () => { 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref\n' + + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs\n' + ' in OuterComponent (at **)', ); @@ -794,7 +794,7 @@ describe('string refs', () => { 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref\n' + + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs\n' + ' in InnerComponent (at **)\n' + ' in OuterComponent (at **)', ); @@ -874,7 +874,7 @@ describe('context legacy', () => { '\n\nPlease update the following components: ' + 'FunctionalLegacyContextConsumer, LegacyContextConsumer, LegacyContextProvider' + '\n\nLearn more about this warning here: ' + - 'https://fb.me/react-legacy-context' + + 'https://reactjs.org/docs/context.html#legacy-api' + '\n in LegacyContextProvider (at **)' + '\n in div (at **)' + '\n in Root (at **)', diff --git a/packages/react/src/__tests__/createReactClassIntegration-test.js b/packages/react/src/__tests__/createReactClassIntegration-test.js index 8fec2209b9067..487bf04463416 100644 --- a/packages/react/src/__tests__/createReactClassIntegration-test.js +++ b/packages/react/src/__tests__/createReactClassIntegration-test.js @@ -365,7 +365,7 @@ describe('create-react-class-integration', () => { expect(() => Component()).toThrow(), ).toErrorDev( 'Warning: Something is calling a React component directly. Use a ' + - 'factory or JSX instead. See: https://fb.me/react-legacyfactory', + 'factory or JSX instead. See: https://reactjs.org/warnings/legacy-factories', {withoutStack: true}, ); }); @@ -555,7 +555,7 @@ describe('create-react-class-integration', () => { ' componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev( [ @@ -598,7 +598,7 @@ describe('create-react-class-integration', () => { ' componentWillReceiveProps\n' + ' componentWillUpdate\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://fb.me/react-unsafe-component-lifecycles', + 'https://reactjs.org/blog/2018/03/27/update-on-async-rendering', ); }).toWarnDev( [ diff --git a/packages/react/src/jsx/ReactJSXElement.js b/packages/react/src/jsx/ReactJSXElement.js index f76c92fb88bb4..b085154c40533 100644 --- a/packages/react/src/jsx/ReactJSXElement.js +++ b/packages/react/src/jsx/ReactJSXElement.js @@ -70,7 +70,7 @@ function warnIfStringRefCannotBeAutoConverted(config, self) { 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + - 'https://fb.me/react-strict-mode-string-ref', + 'https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs', getComponentName(ReactCurrentOwner.current.type), config.ref, ); @@ -89,7 +89,7 @@ function defineKeyPropWarningGetter(props, displayName) { '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', displayName, ); } @@ -111,7 +111,7 @@ function defineRefPropWarningGetter(props, displayName) { '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + - 'prop. (https://fb.me/react-special-props)', + 'prop. (https://reactjs.org/warnings/special-props)', displayName, ); } diff --git a/packages/react/src/jsx/ReactJSXElementValidator.js b/packages/react/src/jsx/ReactJSXElementValidator.js index f7b6a779ea693..dcd8547672ec9 100644 --- a/packages/react/src/jsx/ReactJSXElementValidator.js +++ b/packages/react/src/jsx/ReactJSXElementValidator.js @@ -162,7 +162,7 @@ function validateExplicitKey(element, parentType) { setCurrentlyValidatingElement(element); console.error( 'Each child in a list should have a unique "key" prop.' + - '%s%s See https://fb.me/react-warning-keys for more information.', + '%s%s See https://reactjs.org/docs/lists-and-keys.html#keys for more information.', currentComponentErrorInfo, childOwner, ); diff --git a/packages/scheduler/src/forks/SchedulerHostConfig.default.js b/packages/scheduler/src/forks/SchedulerHostConfig.default.js index 998380bd110a3..465e1a7034d75 100644 --- a/packages/scheduler/src/forks/SchedulerHostConfig.default.js +++ b/packages/scheduler/src/forks/SchedulerHostConfig.default.js @@ -85,13 +85,12 @@ if ( // option to rely on it in the future? const requestAnimationFrame = window.requestAnimationFrame; const cancelAnimationFrame = window.cancelAnimationFrame; - // TODO: Remove fb.me link if (typeof requestAnimationFrame !== 'function') { // Using console['error'] to evade Babel and ESLint console['error']( "This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + - 'polyfill in older browsers. https://fb.me/react-polyfills', + 'polyfill in older browsers. https://reactjs.org/docs/javascript-environment-requirements', ); } if (typeof cancelAnimationFrame !== 'function') { @@ -99,7 +98,7 @@ if ( console['error']( "This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + - 'polyfill in older browsers. https://fb.me/react-polyfills', + 'polyfill in older browsers. https://reactjs.org/docs/javascript-environment-requirements', ); } } diff --git a/packages/shared/invokeGuardedCallbackImpl.js b/packages/shared/invokeGuardedCallbackImpl.js index 60e32e0a55287..bbc97413395bb 100644 --- a/packages/shared/invokeGuardedCallbackImpl.js +++ b/packages/shared/invokeGuardedCallbackImpl.js @@ -215,7 +215,7 @@ if (__DEV__) { error = new Error( "A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + - 'See https://fb.me/react-crossorigin-error for more information.', + 'See https://reactjs.org/docs/cross-origin-errors for more information.', ); } this.onError(error); diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index 1cd9becd724f4..e633985b119e8 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -60,7 +60,7 @@ "58": "dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().", "59": "%s is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`.", "60": "Can only set one of `children` or `props.dangerouslySetInnerHTML`.", - "61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.", + "61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/docs/dom-elements for more information.", "62": "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.", "63": "Must be mounted to trap events", "64": "trapBubbledEvent(...): Requires node to be rendered.", @@ -118,8 +118,8 @@ "116": "traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.", "117": "traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s", "118": "updateTextContent called on non-empty component.", - "119": "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).", - "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).", + "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/warnings/refs-must-have-owner).", + "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/warnings/refs-must-have-owner).", "121": "performUpdateIfNecessary: Unexpected batch number (current %s, pending %s)", "122": "%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", "123": "ReactUpdates: must inject a reconcile transaction class and batching strategy", @@ -148,7 +148,7 @@ "146": "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.", "147": "Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.", "148": "Expected ref to be a function or a string.", - "149": "Element ref was specified as a string (%s) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).", + "149": "Element ref was specified as a string (%s) but no owner was set. You may have multiple copies of React loaded. (details: https://reactjs.org/warnings/refs-must-have-owner).", "150": "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.", "151": "An iterable object provided no iterator.", "152": "%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.", @@ -252,7 +252,7 @@ "251": "batch.commit: Cannot commit a batch multiple times.", "252": "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.", "253": "work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.", - "254": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.", + "254": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/warnings/refs-must-have-ownerfor more information.", "255": "Expected ReactFbErrorUtils.invokeGuardedCallback to be a function.", "256": "Expected ReactFiberErrorDialog.showErrorDialog to be a function.", "257": "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.", @@ -274,7 +274,7 @@ "273": "Nesting of within is not currently supported.", "274": "Text strings must be rendered within a component.", "275": "The current renderer does not support mutation. This error is likely caused by a bug in React. Please file an issue.", - "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills", + "276": "React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/docs/javascript-environment-requirements", "277": "Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.", "278": "unstable_createRoot(...): Target container is not a DOM element.", "279": "Trying to release an event instance into a pool of a different type.", @@ -285,10 +285,10 @@ "284": "Expected ref to be a function, a string, an object returned by React.createRef(), or null.", "285": "The root failed to unmount after an error. This is likely a bug in React. Please file an issue.", "286": "%s(...): the first argument must be a React class instance. Instead received: %s.", - "287": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling", - "288": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling", + "287": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977", + "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://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977", "289": "Function components cannot have refs.", - "290": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.", + "290": "Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/warnings/refs-must-have-ownerfor more information.", "291": "Log of yielded values is not empty. Call expect(Scheduler).toHaveYielded(...) first.", "292": "The matcher `toHaveYielded` expects an instance of React Test Renderer.\n\nTry: expect(Scheduler).toHaveYielded(expectedYields)", "293": "Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.", @@ -300,14 +300,14 @@ "299": "createRoot(...): Target container is not a DOM element.", "300": "Rendered fewer hooks than expected. This may be caused by an accidental early return statement.", "301": "Too many re-renders. React limits the number of renders to prevent an infinite loop.", - "302": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling", + "302": "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977", "303": "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.", "304": "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.", "305": "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.", "306": "Element type is invalid. Received a promise that resolves to: %s. Lazy element type must resolve to a class or function.%s", - "307": "Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)", + "307": "Hooks can only be called inside the body of a function component. (https://reactjs.org/warnings/invalid-hook-call-warning)", "308": "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().", - "309": "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref", + "309": "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs", "310": "Rendered more hooks than during the previous render.", "311": "Should have a queue. This is likely a bug in React. Please file an issue.", "312": "Rendered more hooks than during the previous render", @@ -319,7 +319,7 @@ "318": "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.", "319": "A dehydrated suspense boundary must commit before trying to render. This is probably a bug in React.", "320": "Expected ReactFiberErrorDialog.showErrorDialog to be a function.", - "321": "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.", + "321": "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/warnings/invalid-hook-call-warning for tips about how to debug and fix this problem.", "322": "forwardRef requires a render function but was given %s.", "323": "React has blocked a javascript: URL as a security precaution.", "326": "Expected a valid priority level",