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

Update /link URLs to react.dev #28477

Merged
merged 1 commit into from
Mar 3, 2024
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 @@ -6747,7 +6747,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://reactjs.org/link/hooks-data-fetching',
'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
suggestions: undefined,
},
],
Expand All @@ -6771,7 +6771,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://reactjs.org/link/hooks-data-fetching',
'Learn more about data fetching with Hooks: https://react.dev/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 @@ -111,7 +111,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://reactjs.org/link/hooks-data-fetching',
'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching',
});
}

Expand Down
4 changes: 2 additions & 2 deletions packages/react-client/src/__tests__/ReactFlight-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ describe('ReactFlight', () => {
}).toErrorDev(
'Each child in a list should have a unique "key" prop.\n' +
'\n' +
'Check the render method of `Component`. See https://reactjs.org/link/warning-keys for more information.\n' +
'Check the render method of `Component`. See https://react.dev/link/warning-keys for more information.\n' +
' in span (at **)\n' +
' in Component (at **)\n' +
' in Indirection (at **)\n' +
Expand Down Expand Up @@ -1251,7 +1251,7 @@ describe('ReactFlight', () => {
ReactNoopFlightClient.read(transport);
}).toErrorDev(
'Each child in a list should have a unique "key" prop. ' +
'See https://reactjs.org/link/warning-keys for more information.',
'See https://react.dev/link/warning-keys for more information.',
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
);
didCatch = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ describe('InspectedElement', () => {
{
"errors": [
[
"Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.
"Warning: Each child in a list should have a unique "key" prop. See https://react.dev/link/warning-keys for more information.
at Example",
1,
],
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 @@ -168,7 +168,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://reactjs.org/link/perf-use-production-build',
'https://react.dev/link/perf-use-production-build',
);
});
}
Expand Down
8 changes: 4 additions & 4 deletions packages/react-dom-bindings/src/client/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ function setProp(
if (typeof value !== 'object' || !('__html' in value)) {
throw new Error(
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
'for more information.',
);
}
Expand Down Expand Up @@ -938,7 +938,7 @@ function setPropOnCustomElement(
if (typeof value !== 'object' || !('__html' in value)) {
throw new Error(
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
'for more information.',
);
}
Expand Down Expand Up @@ -1502,7 +1502,7 @@ export function updateProperties(
'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://reactjs.org/link/controlled-components',
'element for the lifetime of the component. More info: https://react.dev/link/controlled-components',
);
didWarnUncontrolledToControlled = true;
}
Expand All @@ -1516,7 +1516,7 @@ export function updateProperties(
'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://reactjs.org/link/controlled-components',
'element for the lifetime of the component. More info: https://react.dev/link/controlled-components',
);
didWarnControlledToUncontrolled = true;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom-bindings/src/client/ReactDOMInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function validateInputProps(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
getCurrentFiberOwnerNameInDevOrNull() || 'A component',
props.type,
);
Expand All @@ -73,7 +73,7 @@ export function validateInputProps(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
getCurrentFiberOwnerNameInDevOrNull() || 'A component',
props.type,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom-bindings/src/client/ReactDOMSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function validateSelectProps(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
);
didWarnValueDefaultValue = true;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom-bindings/src/client/ReactDOMTextarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function validateTextareaProps(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
getCurrentFiberOwnerNameInDevOrNull() || 'A component',
);
didWarnValDefaultVal = true;
Expand Down
12 changes: 6 additions & 6 deletions packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ function pushInnerHTML(
if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
throw new Error(
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
'for more information.',
);
}
Expand Down Expand Up @@ -1573,7 +1573,7 @@ function pushStartSelect(
'(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
);
didWarnDefaultSelectValue = true;
}
Expand Down Expand Up @@ -2019,7 +2019,7 @@ function pushInput(
'(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
'A component',
props.type,
);
Expand All @@ -2032,7 +2032,7 @@ function pushInput(
'(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
'A component',
props.type,
);
Expand Down Expand Up @@ -2167,7 +2167,7 @@ function pushStartTextArea(
'(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://reactjs.org/link/controlled-components',
'https://react.dev/link/controlled-components',
);
didWarnDefaultTextareaValue = true;
}
Expand Down Expand Up @@ -3500,7 +3500,7 @@ function pushStartPreformattedElement(
if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
throw new Error(
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit https://reactjs.org/link/dangerously-set-inner-html ' +
'Please visit https://react.dev/link/dangerously-set-inner-html ' +
'for more information.',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.',
'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ export function validateProperties(type, props) {
if (invalidProps.length === 1) {
console.error(
'Invalid aria prop %s on <%s> tag. ' +
'For details, see https://reactjs.org/link/invalid-aria-props',
'For details, see https://react.dev/link/invalid-aria-props',
unknownPropString,
type,
);
} else if (invalidProps.length > 1) {
console.error(
'Invalid aria props %s on <%s> tag. ' +
'For details, see https://reactjs.org/link/invalid-aria-props',
'For details, see https://react.dev/link/invalid-aria-props',
unknownPropString,
type,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,15 @@ function warnUnknownProperties(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://reactjs.org/link/attribute-behavior ',
'For details, see https://react.dev/link/attribute-behavior ',
unknownPropString,
type,
);
} else if (unknownProps.length > 1) {
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://reactjs.org/link/attribute-behavior ',
'For details, see https://react.dev/link/attribute-behavior ',
unknownPropString,
type,
);
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/src/__tests__/ReactComponent-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ describe('ReactComponent', () => {
'Warning: Component "div" contains the string ref "inner". ' +
'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://reactjs.org/link/strict-mode-string-ref\n' +
'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
' in div (at **)\n' +
' in Wrapper (at **)\n' +
' in Component (at **)',
'Warning: Component "Component" contains the string ref "outer". ' +
'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://reactjs.org/link/strict-mode-string-ref\n' +
'Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\n' +
' in Component (at **)',
]);
});
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 @@ -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://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);
}).toWarnDev(
[
Expand Down Expand Up @@ -936,7 +936,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://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);

class WillMountAndUpdate extends React.Component {
Expand All @@ -963,7 +963,7 @@ describe('ReactComponentLifeCycle', () => {
' componentWillMount\n' +
' UNSAFE_componentWillUpdate\n\n' +
'The above lifecycles should be removed. Learn more about this warning here:\n' +
'https://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillMount has been renamed'], {
withoutStack: true,
Expand All @@ -990,7 +990,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://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
withoutStack: true,
Expand Down Expand Up @@ -1023,7 +1023,7 @@ describe('ReactComponentLifeCycle', () => {
' UNSAFE_componentWillReceiveProps\n' +
' componentWillUpdate\n\n' +
'The above lifecycles should be removed. Learn more about this warning here:\n' +
'https://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);
}).toWarnDev(
[
Expand Down Expand Up @@ -1052,7 +1052,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://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);

class WillMountAndUpdate extends React.Component {
Expand All @@ -1077,7 +1077,7 @@ describe('ReactComponentLifeCycle', () => {
' componentWillMount\n' +
' UNSAFE_componentWillUpdate\n\n' +
'The above lifecycles should be removed. Learn more about this warning here:\n' +
'https://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillMount has been renamed'], {
withoutStack: true,
Expand All @@ -1104,7 +1104,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://reactjs.org/link/unsafe-component-lifecycles',
'https://react.dev/link/unsafe-component-lifecycles',
);
}).toWarnDev(['componentWillReceiveProps has been renamed'], {
withoutStack: true,
Expand Down Expand Up @@ -1570,20 +1570,20 @@ describe('ReactComponentLifeCycle', () => {
}).toWarnDev(
[
/* eslint-disable max-len */
`Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
`Warning: componentWillMount has been renamed, and is not recommended for use. See https://react.dev/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://reactjs.org/link/unsafe-component-lifecycles for details.
`Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/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://reactjs.org/link/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://react.dev/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://reactjs.org/link/unsafe-component-lifecycles for details.
`Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/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
Loading