Skip to content

Commit

Permalink
refactor fb.me redirect link to reactjs.org/link (facebook#19598)
Browse files Browse the repository at this point in the history
* refactor fb.me url to reactjs.org/link

* Update ESLintRuleExhaustiveDeps-test.js

* Update ReactDOMServerIntegrationUntrustedURL-test.internal.js

* Update createReactClassIntegration-test.js

* Update ReactDOMServerIntegrationUntrustedURL-test.internal.js

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
  • Loading branch information
2 people authored and koto committed Jun 15, 2021
1 parent 858577c commit 5d8783a
Show file tree
Hide file tree
Showing 75 changed files with 226 additions and 226 deletions.
Expand Up @@ -6633,7 +6633,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/link/hooks-data-fetching',
suggestions: undefined,
},
],
Expand All @@ -6657,7 +6657,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/link/hooks-data-fetching',
suggestions: undefined,
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
Expand Up @@ -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/link/hooks-data-fetching',
});
}

Expand Down
Expand Up @@ -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/link/invalid-hook-call for tips about how to debug and fix this problem.',
);

expect(getterCalls).toBe(1);
Expand Down
Expand Up @@ -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/link/invalid-hook-call for tips about how to debug and fix this problem.',
);

expect(getterCalls).toBe(1);
Expand Down
Expand Up @@ -24,7 +24,7 @@ export default function NoInteractions({
<p>
<a
className={styles.Link}
href="http://fb.me/react-interaction-tracing"
href="https://reactjs.org/link/interaction-tracing"
rel="noopener noreferrer"
target="_blank">
Learn more about the interaction tracing API here.
Expand Down
Expand Up @@ -176,10 +176,10 @@ const ProfilingNotSupported = () => (
Learn more at{' '}
<a
className={styles.Link}
href="https://fb.me/react-profiling"
href="https://reactjs.org/link/profiling"
rel="noopener noreferrer"
target="_blank">
fb.me/react-profiling
reactjs.org/link/profiling
</a>
.
</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/hook.js
Expand Up @@ -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/link/perf-use-production-build',
);
});
}
Expand Down
24 changes: 12 additions & 12 deletions packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js
Expand Up @@ -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/link/unsafe-component-lifecycles',
);
}).toWarnDev(
[
Expand All @@ -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/link/unsafe-component-lifecycles',
);

class WillMountAndUpdate extends React.Component {
Expand All @@ -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/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillMount has been renamed'], {
withoutStack: true,
Expand All @@ -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/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
withoutStack: true,
Expand Down Expand Up @@ -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/link/unsafe-component-lifecycles',
);
}).toWarnDev(
[
Expand All @@ -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/link/unsafe-component-lifecycles',
);

class WillMountAndUpdate extends React.Component {
Expand All @@ -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/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillMount has been renamed'], {
withoutStack: true,
Expand All @@ -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/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
withoutStack: true,
Expand Down Expand Up @@ -1383,20 +1383,20 @@ describe('ReactComponentLifeCycle', () => {
expect(() => ReactDOM.render(<MyComponent x={1} />, 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/link/unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: MyComponent`,
`Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
`Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://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/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: MyComponent`,
`Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
`Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/src/__tests__/ReactDOMAttribute-test.js
Expand Up @@ -93,7 +93,7 @@ describe('ReactDOM unknown attribute', () => {
expect(() => testUnknownAttributeRemoval(Symbol('foo'))).toErrorDev(
'Warning: Invalid value for prop `unknown` on <div> 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/link/attribute-behavior \n' +
' in div (at **)',
);
});
Expand All @@ -105,7 +105,7 @@ describe('ReactDOM unknown attribute', () => {
'Warning: Invalid value for prop `unknown` on <div> 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/link/attribute-behavior \n' +
' in div (at **)',
);
});
Expand Down
8 changes: 4 additions & 4 deletions packages/react-dom/src/__tests__/ReactDOMComponent-test.js
Expand Up @@ -150,7 +150,7 @@ describe('ReactDOMComponent', () => {
).toErrorDev(
'Warning: Invalid value for prop `foo` on <div> 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/link/attribute-behavior ' +
'\n in div (at **)',
);
});
Expand All @@ -162,7 +162,7 @@ describe('ReactDOMComponent', () => {
).toErrorDev(
'Warning: Invalid values for props `foo`, `baz` on <div> 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/link/attribute-behavior ' +
'\n in div (at **)',
);
});
Expand Down Expand Up @@ -1384,7 +1384,7 @@ describe('ReactDOMComponent', () => {
mountComponent({dangerouslySetInnerHTML: '<span>Hi Jim!</span>'});
}).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/link/dangerously-set-inner-html for more information.',
);
});

Expand All @@ -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/link/dangerously-set-inner-html for more information.',
);
});

Expand Down
Expand Up @@ -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/link/controlled-components',
);
});

Expand Down

0 comments on commit 5d8783a

Please sign in to comment.