Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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/link/hooks-data-fetching',
suggestions: undefined,
},
],
Expand All @@ -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/link/hooks-data-fetching',
suggestions: undefined,
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading