Skip to content

Commit 1940cb2

Browse files
authored
Update /link URLs to react.dev (#28477)
Depends on reactjs/react.dev#6670 [merged]
1 parent 30ae0ba commit 1940cb2

File tree

72 files changed

+218
-218
lines changed

Some content is hidden

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

72 files changed

+218
-218
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -6747,7 +6747,7 @@ const tests = {
67476747
' }\n' +
67486748
' fetchData();\n' +
67496749
`}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6750-
'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
6750+
'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
67516751
suggestions: undefined,
67526752
},
67536753
],
@@ -6771,7 +6771,7 @@ const tests = {
67716771
' }\n' +
67726772
' fetchData();\n' +
67736773
`}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
6774-
'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
6774+
'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
67756775
suggestions: undefined,
67766776
},
67776777
],

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default {
111111
' }\n' +
112112
' fetchData();\n' +
113113
`}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
114-
'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching',
114+
'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
115115
});
116116
}
117117

packages/react-client/src/__tests__/ReactFlight-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ describe('ReactFlight', () => {
994994
}).toErrorDev(
995995
'Each child in a list should have a unique "key" prop.\n' +
996996
'\n' +
997-
'Check the render method of `Component`. See https://reactjs.org/link/warning-keys for more information.\n' +
997+
'Check the render method of `Component`. See https://react.dev/link/warning-keys for more information.\n' +
998998
' in span (at **)\n' +
999999
' in Component (at **)\n' +
10001000
' in Indirection (at **)\n' +
@@ -1251,7 +1251,7 @@ describe('ReactFlight', () => {
12511251
ReactNoopFlightClient.read(transport);
12521252
}).toErrorDev(
12531253
'Each child in a list should have a unique "key" prop. ' +
1254-
'See https://reactjs.org/link/warning-keys for more information.',
1254+
'See https://react.dev/link/warning-keys for more information.',
12551255
);
12561256
});
12571257

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,7 @@ describe('ReactHooksInspectionIntegration', () => {
18831883
'1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
18841884
'2. You might be breaking the Rules of Hooks\n' +
18851885
'3. You might have more than one copy of React in the same app\n' +
1886-
'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
1886+
'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
18871887
);
18881888
didCatch = true;
18891889
}

packages/react-devtools-shared/src/__tests__/inspectedElement-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,7 @@ describe('InspectedElement', () => {
25582558
{
25592559
"errors": [
25602560
[
2561-
"Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.
2561+
"Warning: Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.
25622562
at Example",
25632563
1,
25642564
],

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export function installHook(target: any): DevToolsHook | null {
168168
'React is running in production mode, but dead code ' +
169169
'elimination has not been applied. Read how to correctly ' +
170170
'configure React for production: ' +
171-
'https://reactjs.org/link/perf-use-production-build',
171+
'https://react.dev/link/perf-use-production-build',
172172
);
173173
});
174174
}

packages/react-dom-bindings/src/client/ReactDOMComponent.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ function setProp(
610610
if (typeof value !== 'object' || !('__html' in value)) {
611611
throw new Error(
612612
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
613-
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
613+
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
614614
'for more information.',
615615
);
616616
}
@@ -938,7 +938,7 @@ function setPropOnCustomElement(
938938
if (typeof value !== 'object' || !('__html' in value)) {
939939
throw new Error(
940940
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
941-
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
941+
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
942942
'for more information.',
943943
);
944944
}
@@ -1502,7 +1502,7 @@ export function updateProperties(
15021502
'This is likely caused by the value changing from undefined to ' +
15031503
'a defined value, which should not happen. ' +
15041504
'Decide between using a controlled or uncontrolled input ' +
1505-
'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components',
1505+
'element for the lifetime of the component. More info: https://react.dev/link/controlled-components',
15061506
);
15071507
didWarnUncontrolledToControlled = true;
15081508
}
@@ -1516,7 +1516,7 @@ export function updateProperties(
15161516
'This is likely caused by the value changing from a defined to ' +
15171517
'undefined, which should not happen. ' +
15181518
'Decide between using a controlled or uncontrolled input ' +
1519-
'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components',
1519+
'element for the lifetime of the component. More info: https://react.dev/link/controlled-components',
15201520
);
15211521
didWarnControlledToUncontrolled = true;
15221522
}

packages/react-dom-bindings/src/client/ReactDOMInput.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function validateInputProps(element: Element, props: Object) {
5656
'(specify either the checked prop, or the defaultChecked prop, but not ' +
5757
'both). Decide between using a controlled or uncontrolled input ' +
5858
'element and remove one of these props. More info: ' +
59-
'https://reactjs.org/link/controlled-components',
59+
'https://react.dev/link/controlled-components',
6060
getCurrentFiberOwnerNameInDevOrNull() || 'A component',
6161
props.type,
6262
);
@@ -73,7 +73,7 @@ export function validateInputProps(element: Element, props: Object) {
7373
'(specify either the value prop, or the defaultValue prop, but not ' +
7474
'both). Decide between using a controlled or uncontrolled input ' +
7575
'element and remove one of these props. More info: ' +
76-
'https://reactjs.org/link/controlled-components',
76+
'https://react.dev/link/controlled-components',
7777
getCurrentFiberOwnerNameInDevOrNull() || 'A component',
7878
props.type,
7979
);

packages/react-dom-bindings/src/client/ReactDOMSelect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function validateSelectProps(element: Element, props: Object) {
135135
'(specify either the value prop, or the defaultValue prop, but not ' +
136136
'both). Decide between using a controlled or uncontrolled select ' +
137137
'element and remove one of these props. More info: ' +
138-
'https://reactjs.org/link/controlled-components',
138+
'https://react.dev/link/controlled-components',
139139
);
140140
didWarnValueDefaultValue = true;
141141
}

packages/react-dom-bindings/src/client/ReactDOMTextarea.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function validateTextareaProps(element: Element, props: Object) {
4444
'(specify either the value prop, or the defaultValue prop, but not ' +
4545
'both). Decide between using a controlled or uncontrolled textarea ' +
4646
'and remove one of these props. More info: ' +
47-
'https://reactjs.org/link/controlled-components',
47+
'https://react.dev/link/controlled-components',
4848
getCurrentFiberOwnerNameInDevOrNull() || 'A component',
4949
);
5050
didWarnValDefaultVal = true;

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ function pushInnerHTML(
14541454
if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
14551455
throw new Error(
14561456
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
1457-
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
1457+
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
14581458
'for more information.',
14591459
);
14601460
}
@@ -1573,7 +1573,7 @@ function pushStartSelect(
15731573
'(specify either the value prop, or the defaultValue prop, but not ' +
15741574
'both). Decide between using a controlled or uncontrolled select ' +
15751575
'element and remove one of these props. More info: ' +
1576-
'https://reactjs.org/link/controlled-components',
1576+
'https://react.dev/link/controlled-components',
15771577
);
15781578
didWarnDefaultSelectValue = true;
15791579
}
@@ -2019,7 +2019,7 @@ function pushInput(
20192019
'(specify either the checked prop, or the defaultChecked prop, but not ' +
20202020
'both). Decide between using a controlled or uncontrolled input ' +
20212021
'element and remove one of these props. More info: ' +
2022-
'https://reactjs.org/link/controlled-components',
2022+
'https://react.dev/link/controlled-components',
20232023
'A component',
20242024
props.type,
20252025
);
@@ -2032,7 +2032,7 @@ function pushInput(
20322032
'(specify either the value prop, or the defaultValue prop, but not ' +
20332033
'both). Decide between using a controlled or uncontrolled input ' +
20342034
'element and remove one of these props. More info: ' +
2035-
'https://reactjs.org/link/controlled-components',
2035+
'https://react.dev/link/controlled-components',
20362036
'A component',
20372037
props.type,
20382038
);
@@ -2167,7 +2167,7 @@ function pushStartTextArea(
21672167
'(specify either the value prop, or the defaultValue prop, but not ' +
21682168
'both). Decide between using a controlled or uncontrolled textarea ' +
21692169
'and remove one of these props. More info: ' +
2170-
'https://reactjs.org/link/controlled-components',
2170+
'https://react.dev/link/controlled-components',
21712171
);
21722172
didWarnDefaultTextareaValue = true;
21732173
}
@@ -3500,7 +3500,7 @@ function pushStartPreformattedElement(
35003500
if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
35013501
throw new Error(
35023502
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
3503-
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
3503+
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
35043504
'for more information.',
35053505
);
35063506
}

packages/react-dom-bindings/src/shared/ReactDOMFormActions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function resolveDispatcher() {
5656
'1. You might have mismatching versions of React and the renderer (such as React DOM)\n' +
5757
'2. You might be breaking the Rules of Hooks\n' +
5858
'3. You might have more than one copy of React in the same app\n' +
59-
'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
59+
'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
6060
);
6161
}
6262
}

packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ export function validateProperties(type, props) {
9393
if (invalidProps.length === 1) {
9494
console.error(
9595
'Invalid aria prop %s on <%s> tag. ' +
96-
'For details, see https://reactjs.org/link/invalid-aria-props',
96+
'For details, see https://react.dev/link/invalid-aria-props',
9797
unknownPropString,
9898
type,
9999
);
100100
} else if (invalidProps.length > 1) {
101101
console.error(
102102
'Invalid aria props %s on <%s> tag. ' +
103-
'For details, see https://reactjs.org/link/invalid-aria-props',
103+
'For details, see https://react.dev/link/invalid-aria-props',
104104
unknownPropString,
105105
type,
106106
);

packages/react-dom-bindings/src/shared/ReactDOMUnknownPropertyHook.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -356,15 +356,15 @@ function warnUnknownProperties(type, props, eventRegistry) {
356356
console.error(
357357
'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' +
358358
'or pass a string or number value to keep it in the DOM. ' +
359-
'For details, see https://reactjs.org/link/attribute-behavior ',
359+
'For details, see https://react.dev/link/attribute-behavior ',
360360
unknownPropString,
361361
type,
362362
);
363363
} else if (unknownProps.length > 1) {
364364
console.error(
365365
'Invalid values for props %s on <%s> tag. Either remove them from the element, ' +
366366
'or pass a string or number value to keep them in the DOM. ' +
367-
'For details, see https://reactjs.org/link/attribute-behavior ',
367+
'For details, see https://react.dev/link/attribute-behavior ',
368368
unknownPropString,
369369
type,
370370
);

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ describe('ReactComponent', () => {
171171
'Warning: Component "div" contains the string ref "inner". ' +
172172
'Support for string refs will be removed in a future major release. ' +
173173
'We recommend using useRef() or createRef() instead. ' +
174-
'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
174+
'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
175175
' in div (at **)\n' +
176176
' in Wrapper (at **)\n' +
177177
' in Component (at **)',
178178
'Warning: Component "Component" contains the string ref "outer". ' +
179179
'Support for string refs will be removed in a future major release. ' +
180180
'We recommend using useRef() or createRef() instead. ' +
181-
'Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\n' +
181+
'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
182182
' in Component (at **)',
183183
]);
184184
});

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -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://reactjs.org/link/unsafe-component-lifecycles',
909+
'https://react.dev/link/unsafe-component-lifecycles',
910910
);
911911
}).toWarnDev(
912912
[
@@ -936,7 +936,7 @@ describe('ReactComponentLifeCycle', () => {
936936
'WillMount uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
937937
' UNSAFE_componentWillMount\n\n' +
938938
'The above lifecycles should be removed. Learn more about this warning here:\n' +
939-
'https://reactjs.org/link/unsafe-component-lifecycles',
939+
'https://react.dev/link/unsafe-component-lifecycles',
940940
);
941941

942942
class WillMountAndUpdate extends React.Component {
@@ -963,7 +963,7 @@ describe('ReactComponentLifeCycle', () => {
963963
' componentWillMount\n' +
964964
' UNSAFE_componentWillUpdate\n\n' +
965965
'The above lifecycles should be removed. Learn more about this warning here:\n' +
966-
'https://reactjs.org/link/unsafe-component-lifecycles',
966+
'https://react.dev/link/unsafe-component-lifecycles',
967967
);
968968
}).toWarnDev(['componentWillMount has been renamed'], {
969969
withoutStack: true,
@@ -990,7 +990,7 @@ describe('ReactComponentLifeCycle', () => {
990990
'WillReceiveProps uses getDerivedStateFromProps() but also contains the following legacy lifecycles:\n' +
991991
' componentWillReceiveProps\n\n' +
992992
'The above lifecycles should be removed. Learn more about this warning here:\n' +
993-
'https://reactjs.org/link/unsafe-component-lifecycles',
993+
'https://react.dev/link/unsafe-component-lifecycles',
994994
);
995995
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
996996
withoutStack: true,
@@ -1023,7 +1023,7 @@ describe('ReactComponentLifeCycle', () => {
10231023
' UNSAFE_componentWillReceiveProps\n' +
10241024
' componentWillUpdate\n\n' +
10251025
'The above lifecycles should be removed. Learn more about this warning here:\n' +
1026-
'https://reactjs.org/link/unsafe-component-lifecycles',
1026+
'https://react.dev/link/unsafe-component-lifecycles',
10271027
);
10281028
}).toWarnDev(
10291029
[
@@ -1052,7 +1052,7 @@ describe('ReactComponentLifeCycle', () => {
10521052
'WillMount uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
10531053
' UNSAFE_componentWillMount\n\n' +
10541054
'The above lifecycles should be removed. Learn more about this warning here:\n' +
1055-
'https://reactjs.org/link/unsafe-component-lifecycles',
1055+
'https://react.dev/link/unsafe-component-lifecycles',
10561056
);
10571057

10581058
class WillMountAndUpdate extends React.Component {
@@ -1077,7 +1077,7 @@ describe('ReactComponentLifeCycle', () => {
10771077
' componentWillMount\n' +
10781078
' UNSAFE_componentWillUpdate\n\n' +
10791079
'The above lifecycles should be removed. Learn more about this warning here:\n' +
1080-
'https://reactjs.org/link/unsafe-component-lifecycles',
1080+
'https://react.dev/link/unsafe-component-lifecycles',
10811081
);
10821082
}).toWarnDev(['componentWillMount has been renamed'], {
10831083
withoutStack: true,
@@ -1104,7 +1104,7 @@ describe('ReactComponentLifeCycle', () => {
11041104
'WillReceiveProps uses getSnapshotBeforeUpdate() but also contains the following legacy lifecycles:\n' +
11051105
' componentWillReceiveProps\n\n' +
11061106
'The above lifecycles should be removed. Learn more about this warning here:\n' +
1107-
'https://reactjs.org/link/unsafe-component-lifecycles',
1107+
'https://react.dev/link/unsafe-component-lifecycles',
11081108
);
11091109
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
11101110
withoutStack: true,
@@ -1570,20 +1570,20 @@ describe('ReactComponentLifeCycle', () => {
15701570
}).toWarnDev(
15711571
[
15721572
/* eslint-disable max-len */
1573-
`Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1573+
`Warning: componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
15741574
15751575
* Move code with side effects to componentDidMount, and set initial state in the constructor.
15761576
* 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.
15771577
15781578
Please update the following components: MyComponent`,
1579-
`Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1579+
`Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
15801580
15811581
* Move data fetching code or side effects to componentDidUpdate.
1582-
* 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
1582+
* 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://react.dev/link/derived-state
15831583
* 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.
15841584
15851585
Please update the following components: MyComponent`,
1586-
`Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
1586+
`Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
15871587
15881588
* Move data fetching code or side effects to componentDidUpdate.
15891589
* 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.

0 commit comments

Comments
 (0)