Skip to content

Commit 702fad4

Browse files
cylimgaearon
andauthored
refactor fb.me redirect link to reactjs.org/link (#19598)
* refactor fb.me url to reactjs.org/link * Update ESLintRuleExhaustiveDeps-test.js * Update ReactDOMServerIntegrationUntrustedURL-test.internal.js * Update createReactClassIntegration-test.js * Update ReactDOMServerIntegrationUntrustedURL-test.internal.js Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
1 parent 49cd77d commit 702fad4

File tree

75 files changed

+226
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+226
-226
lines changed

packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6633,7 +6633,7 @@ const tests = {
66336633
' }\n' +
66346634
' fetchData();\n' +
66356635
`}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6636-
'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching',
6636+
'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
66376637
suggestions: undefined,
66386638
},
66396639
],
@@ -6657,7 +6657,7 @@ const tests = {
66576657
' }\n' +
66586658
' fetchData();\n' +
66596659
`}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6660-
'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching',
6660+
'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
66616661
suggestions: undefined,
66626662
},
66636663
],

packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export default {
258258
' }\n' +
259259
' fetchData();\n' +
260260
`}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
261-
'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching',
261+
'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
262262
});
263263
}
264264

packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ describe('ReactHooksInspection', () => {
284284
'1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
285285
'2. You might be breaking the Rules of Hooks\n' +
286286
'3. You might have more than one copy of React in the same app\n' +
287-
'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
287+
'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
288288
);
289289

290290
expect(getterCalls).toBe(1);

packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ describe('ReactHooksInspectionIntegration', () => {
787787
'1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
788788
'2. You might be breaking the Rules of Hooks\n' +
789789
'3. You might have more than one copy of React in the same app\n' +
790-
'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.',
790+
'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
791791
);
792792

793793
expect(getterCalls).toBe(1);

packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function NoInteractions({
2424
<p>
2525
<a
2626
className={styles.Link}
27-
href="http://fb.me/react-interaction-tracing"
27+
href="https://reactjs.org/link/interaction-tracing"
2828
rel="noopener noreferrer"
2929
target="_blank">
3030
Learn more about the interaction tracing API here.

packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ const ProfilingNotSupported = () => (
176176
Learn more at{' '}
177177
<a
178178
className={styles.Link}
179-
href="https://fb.me/react-profiling"
179+
href="https://reactjs.org/link/profiling"
180180
rel="noopener noreferrer"
181181
target="_blank">
182-
fb.me/react-profiling
182+
reactjs.org/link/profiling
183183
</a>
184184
.
185185
</p>

packages/react-devtools-shared/src/hook.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export function installHook(target: any): DevToolsHook | null {
145145
'React is running in production mode, but dead code ' +
146146
'elimination has not been applied. Read how to correctly ' +
147147
'configure React for production: ' +
148-
'https://fb.me/react-perf-use-the-production-build',
148+
'https://reactjs.org/link/perf-use-production-build',
149149
);
150150
});
151151
}

packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ describe('ReactComponentLifeCycle', () => {
801801
' UNSAFE_componentWillReceiveProps\n' +
802802
' componentWillUpdate\n\n' +
803803
'The above lifecycles should be removed. Learn more about this warning here:\n' +
804-
'https://fb.me/react-unsafe-component-lifecycles',
804+
'https://reactjs.org/link/unsafe-component-lifecycles',
805805
);
806806
}).toWarnDev(
807807
[
@@ -827,7 +827,7 @@ describe('ReactComponentLifeCycle', () => {
827827
'WillMount uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
828828
' UNSAFE_componentWillMount\n\n' +
829829
'The above lifecycles should be removed. Learn more about this warning here:\n' +
830-
'https://fb.me/react-unsafe-component-lifecycles',
830+
'https://reactjs.org/link/unsafe-component-lifecycles',
831831
);
832832

833833
class WillMountAndUpdate extends React.Component {
@@ -851,7 +851,7 @@ describe('ReactComponentLifeCycle', () => {
851851
' componentWillMount\n' +
852852
' UNSAFE_componentWillUpdate\n\n' +
853853
'The above lifecycles should be removed. Learn more about this warning here:\n' +
854-
'https://fb.me/react-unsafe-component-lifecycles',
854+
'https://reactjs.org/link/unsafe-component-lifecycles',
855855
);
856856
}).toWarnDev(['componentWillMount has been renamed'], {
857857
withoutStack: true,
@@ -874,7 +874,7 @@ describe('ReactComponentLifeCycle', () => {
874874
'WillReceiveProps uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
875875
' componentWillReceiveProps\n\n' +
876876
'The above lifecycles should be removed. Learn more about this warning here:\n' +
877-
'https://fb.me/react-unsafe-component-lifecycles',
877+
'https://reactjs.org/link/unsafe-component-lifecycles',
878878
);
879879
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
880880
withoutStack: true,
@@ -906,7 +906,7 @@ describe('ReactComponentLifeCycle', () => {
906906
' UNSAFE_componentWillReceiveProps\n' +
907907
' componentWillUpdate\n\n' +
908908
'The above lifecycles should be removed. Learn more about this warning here:\n' +
909-
'https://fb.me/react-unsafe-component-lifecycles',
909+
'https://reactjs.org/link/unsafe-component-lifecycles',
910910
);
911911
}).toWarnDev(
912912
[
@@ -931,7 +931,7 @@ describe('ReactComponentLifeCycle', () => {
931931
'WillMount uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
932932
' UNSAFE_componentWillMount\n\n' +
933933
'The above lifecycles should be removed. Learn more about this warning here:\n' +
934-
'https://fb.me/react-unsafe-component-lifecycles',
934+
'https://reactjs.org/link/unsafe-component-lifecycles',
935935
);
936936

937937
class WillMountAndUpdate extends React.Component {
@@ -954,7 +954,7 @@ describe('ReactComponentLifeCycle', () => {
954954
' componentWillMount\n' +
955955
' UNSAFE_componentWillUpdate\n\n' +
956956
'The above lifecycles should be removed. Learn more about this warning here:\n' +
957-
'https://fb.me/react-unsafe-component-lifecycles',
957+
'https://reactjs.org/link/unsafe-component-lifecycles',
958958
);
959959
}).toWarnDev(['componentWillMount has been renamed'], {
960960
withoutStack: true,
@@ -976,7 +976,7 @@ describe('ReactComponentLifeCycle', () => {
976976
'WillReceiveProps uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
977977
' componentWillReceiveProps\n\n' +
978978
'The above lifecycles should be removed. Learn more about this warning here:\n' +
979-
'https://fb.me/react-unsafe-component-lifecycles',
979+
'https://reactjs.org/link/unsafe-component-lifecycles',
980980
);
981981
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
982982
withoutStack: true,
@@ -1383,20 +1383,20 @@ describe('ReactComponentLifeCycle', () => {
13831383
expect(() => ReactDOM.render(<MyComponent x={1} />, container)).toWarnDev(
13841384
[
13851385
/* eslint-disable max-len */
1386-
`Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
1386+
`Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
13871387
13881388
* Move code with side effects to componentDidMount, and set initial state in the constructor.
13891389
* 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.
13901390
13911391
Please update the following components: MyComponent`,
1392-
`Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
1392+
`Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
13931393
13941394
* Move data fetching code or side effects to componentDidUpdate.
1395-
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
1395+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
13961396
* 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.
13971397
13981398
Please update the following components: MyComponent`,
1399-
`Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
1399+
`Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
14001400
14011401
* Move data fetching code or side effects to componentDidUpdate.
14021402
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

packages/react-dom/src/__tests__/ReactDOMAttribute-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe('ReactDOM unknown attribute', () => {
9393
expect(() => testUnknownAttributeRemoval(Symbol('foo'))).toErrorDev(
9494
'Warning: Invalid value for prop `unknown` on <div> tag. Either remove it ' +
9595
'from the element, or pass a string or number value to keep it ' +
96-
'in the DOM. For details, see https://fb.me/react-attribute-behavior\n' +
96+
'in the DOM. For details, see https://reactjs.org/link/attribute-behavior \n' +
9797
' in div (at **)',
9898
);
9999
});
@@ -105,7 +105,7 @@ describe('ReactDOM unknown attribute', () => {
105105
'Warning: Invalid value for prop `unknown` on <div> tag. Either remove ' +
106106
'it from the element, or pass a string or number value to ' +
107107
'keep it in the DOM. For details, see ' +
108-
'https://fb.me/react-attribute-behavior\n' +
108+
'https://reactjs.org/link/attribute-behavior \n' +
109109
' in div (at **)',
110110
);
111111
});

packages/react-dom/src/__tests__/ReactDOMComponent-test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe('ReactDOMComponent', () => {
150150
).toErrorDev(
151151
'Warning: Invalid value for prop `foo` on <div> tag. Either remove it ' +
152152
'from the element, or pass a string or number value to keep ' +
153-
'it in the DOM. For details, see https://fb.me/react-attribute-behavior' +
153+
'it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' +
154154
'\n in div (at **)',
155155
);
156156
});
@@ -162,7 +162,7 @@ describe('ReactDOMComponent', () => {
162162
).toErrorDev(
163163
'Warning: Invalid values for props `foo`, `baz` on <div> tag. Either remove ' +
164164
'them from the element, or pass a string or number value to keep ' +
165-
'them in the DOM. For details, see https://fb.me/react-attribute-behavior' +
165+
'them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ' +
166166
'\n in div (at **)',
167167
);
168168
});
@@ -1384,7 +1384,7 @@ describe('ReactDOMComponent', () => {
13841384
mountComponent({dangerouslySetInnerHTML: '<span>Hi Jim!</span>'});
13851385
}).toThrowError(
13861386
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1387-
'Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.',
1387+
'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.',
13881388
);
13891389
});
13901390

@@ -1393,7 +1393,7 @@ describe('ReactDOMComponent', () => {
13931393
mountComponent({dangerouslySetInnerHTML: {foo: 'bar'}});
13941394
}).toThrowError(
13951395
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1396-
'Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.',
1396+
'Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.',
13971397
);
13981398
});
13991399

packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('ReactDOMComponentTree', () => {
183183
'a defined value, which should not happen. ' +
184184
'Decide between using a controlled or uncontrolled input ' +
185185
'element for the lifetime of the component. More info: ' +
186-
'https://fb.me/react-controlled-components',
186+
'https://reactjs.org/link/controlled-components',
187187
);
188188
});
189189

0 commit comments

Comments
 (0)