mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
chore: update all website links about react (#36638)
Summary: New website of React is online, so some links about react should be also updated in README.md. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Fixed] - Fix some links about react in readme Pull Request resolved: https://github.com/facebook/react-native/pull/36638 Test Plan: The PR just changes some links in readme, don't need to test. Reviewed By: jacdebug Differential Revision: D44959199 Pulled By: blakef fbshipit-source-id: 14a66a2d2b086fbe16f715c621c59a6d8d6ee698
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ebf10798a5
commit
234f1999a1
+2
-2
@@ -4200,7 +4200,7 @@ This release includes [599 commits by 73 different contributors](https://github.
|
||||
- Android tooling has been updated to match newer configuration requirements (SDK 27, gradle 4.4, and support library 27); building with Android plugin 3.2 doesn't work due to the gradle scripts, so **please** stay on Android Studio 3.1 for now
|
||||
- Support Babel 7 stable landed! Be sure to read [here](https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/) about using TypeScript and check out the [Babel 7 migration guide](https://babeljs.io/docs/en/next/v7-migration) for help migrating.
|
||||
- Metro has been upgraded (with Babel 7 and better transformer support), and in the next major release we plan on having two new features (ram bundles and inline requires) optional for you all to use - you can read how it will happen [here](https://github.com/react-native-community/discussions-and-proposals/blob/master/core-meetings/2018-09-metro-meeting.md); moreover, if you have a custom packager config, we recommend you read also the "updating to this version" section.
|
||||
- Flow, React, and related packages have also been updated; this includes [working support](https://github.com/facebook/react-native/commit/5491c3f942430982ce9cb6140ed1733879ed3d1d) for the [React Profiler](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html).
|
||||
- Flow, React, and related packages have also been updated; this includes [working support](https://github.com/facebook/react-native/commit/5491c3f942430982ce9cb6140ed1733879ed3d1d) for the [React Profiler](https://react.dev/blog/2018/09/10/introducing-the-react-profiler.html).
|
||||
|
||||
#### The Slimmening is happening
|
||||
|
||||
@@ -5152,7 +5152,7 @@ year!
|
||||
)
|
||||
- React is now v16.2.0, and it took react-test-renderer along with it; [now with
|
||||
more
|
||||
fragments!](https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html)
|
||||
fragments!](https://react.dev/blog/2017/11/28/react-v16.2.0-fragment-support.html)
|
||||
🎉 ([c7f37074ac](https://github.com/facebook/react-native/commit/c7f37074ac89f7e568ca26a6bad3bdb02812c39f) and
|
||||
[cd938d731c](https://github.com/facebook/react-native/commit/cd938d731c7531a683c050cd829a543d145e3dc1) by
|
||||
[@bvaughn](https://github.com/bvaughn))
|
||||
|
||||
@@ -50,7 +50,7 @@ React Native brings [**React**'s][r] declarative UI framework to iOS and Android
|
||||
|
||||
React Native is developed and supported by many companies and individual core contributors. Find out more in our [ecosystem overview][e].
|
||||
|
||||
[r]: https://reactjs.org/
|
||||
[r]: https://react.dev/
|
||||
[p]: https://reactnative.dev/docs/out-of-tree-platforms
|
||||
[e]: https://github.com/facebook/react-native/blob/HEAD/ECOSYSTEM.md
|
||||
|
||||
@@ -90,7 +90,7 @@ The React Native documentation discusses components, APIs, and topics that are s
|
||||
The source for the React Native documentation and website is hosted on a separate repo, [**@facebook/react-native-website**][repo-website].
|
||||
|
||||
[docs]: https://reactnative.dev/docs/getting-started
|
||||
[r-docs]: https://reactjs.org/docs/getting-started.html
|
||||
[r-docs]: https://react.dev/learn
|
||||
[repo-website]: https://github.com/facebook/react-native-website
|
||||
|
||||
## 🚀 Upgrading
|
||||
|
||||
@@ -213,7 +213,7 @@ describe('LogBoxMessage', () => {
|
||||
<LogBoxMessage
|
||||
style={{}}
|
||||
message={{
|
||||
content: 'http://reactnative.dev',
|
||||
content: 'https://reactnative.dev',
|
||||
substitutions: [],
|
||||
}}
|
||||
/>,
|
||||
@@ -227,7 +227,7 @@ describe('LogBoxMessage', () => {
|
||||
<LogBoxMessage
|
||||
style={{}}
|
||||
message={{
|
||||
content: 'http://reactnative.dev and http://reactjs.org',
|
||||
content: 'https://reactnative.dev and https://react.dev',
|
||||
substitutions: [],
|
||||
}}
|
||||
/>,
|
||||
@@ -242,7 +242,7 @@ describe('LogBoxMessage', () => {
|
||||
style={{}}
|
||||
maxLength={35}
|
||||
message={{
|
||||
content: 'http://reactnative.dev and http://reactjs.org',
|
||||
content: 'https://reactnative.dev and https://react.dev',
|
||||
substitutions: [],
|
||||
}}
|
||||
/>,
|
||||
|
||||
+5
-5
@@ -10,7 +10,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
http://reactnative.dev
|
||||
https://reactnative.dev
|
||||
</Text>
|
||||
<Text>
|
||||
and
|
||||
@@ -23,7 +23,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
http://reactjs.org
|
||||
https://react.dev
|
||||
</Text>
|
||||
</Text>
|
||||
`;
|
||||
@@ -38,10 +38,10 @@ exports[`LogBoxMessage Should handle truncated links 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
http://reactnative.dev
|
||||
https://reactnative.dev
|
||||
</Text>
|
||||
<Text>
|
||||
and http://r
|
||||
and https:/
|
||||
</Text>
|
||||
</Text>
|
||||
`;
|
||||
@@ -56,7 +56,7 @@ exports[`LogBoxMessage Should make links tappable 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
http://reactnative.dev
|
||||
https://reactnative.dev
|
||||
</Text>
|
||||
</Text>
|
||||
`;
|
||||
|
||||
+27
-27
@@ -286,7 +286,7 @@ var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
|
||||
error = new Error(
|
||||
"A cross-origin error was thrown. React doesn't have access to " +
|
||||
"the actual error object in development. " +
|
||||
"See https://reactjs.org/link/crossorigin-error for more information."
|
||||
"See https://react.dev/link/crossorigin-error for more information."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -857,7 +857,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
|
||||
"This synthetic event is reused for performance reasons. If you're seeing this, " +
|
||||
"you're %s `%s` on a released/nullified synthetic event. %s. " +
|
||||
"If you must keep the original synthetic event around, use event.persist(). " +
|
||||
"See https://reactjs.org/link/event-pooling for more information.",
|
||||
"See https://react.dev/link/event-pooling for more information.",
|
||||
action,
|
||||
propName,
|
||||
result
|
||||
@@ -4115,7 +4115,7 @@ function injectInternals(internals) {
|
||||
error(
|
||||
"The installed version of React DevTools is too old and will not work " +
|
||||
"with the current version of React. Please update React DevTools. " +
|
||||
"https://reactjs.org/link/react-devtools"
|
||||
"https://react.dev/link/react-devtools"
|
||||
);
|
||||
} // DevTools exists, even though it doesn't support Fiber.
|
||||
|
||||
@@ -6628,7 +6628,7 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
error(
|
||||
"Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" +
|
||||
"\nPlease update the following components: %s",
|
||||
sortedNames
|
||||
@@ -6643,11 +6643,11 @@ var ReactStrictModeWarnings = {
|
||||
error(
|
||||
"Using UNSAFE_componentWillReceiveProps in strict mode is not recommended " +
|
||||
"and may indicate bugs in your code. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"* 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\n" +
|
||||
"static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n" +
|
||||
"\nPlease update the following components: %s",
|
||||
_sortedNames
|
||||
);
|
||||
@@ -6661,7 +6661,7 @@ var ReactStrictModeWarnings = {
|
||||
error(
|
||||
"Using UNSAFE_componentWillUpdate in strict mode is not recommended " +
|
||||
"and may indicate bugs in your code. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"\nPlease update the following components: %s",
|
||||
_sortedNames2
|
||||
@@ -6673,7 +6673,7 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
warn(
|
||||
"componentWillMount has been renamed, and is not recommended for use. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" +
|
||||
"* Rename componentWillMount to UNSAFE_componentWillMount to suppress " +
|
||||
"this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " +
|
||||
@@ -6691,11 +6691,11 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
warn(
|
||||
"componentWillReceiveProps has been renamed, and is not recommended for use. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"* 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\n" +
|
||||
"static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n" +
|
||||
"* 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 " +
|
||||
@@ -6710,7 +6710,7 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
warn(
|
||||
"componentWillUpdate has been renamed, and is not recommended for use. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress " +
|
||||
"this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " +
|
||||
@@ -6783,7 +6783,7 @@ var ReactStrictModeWarnings = {
|
||||
"\n\nThe old API will be supported in all 16.x releases, but applications " +
|
||||
"using it should migrate to the new version." +
|
||||
"\n\nPlease update the following components: %s" +
|
||||
"\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",
|
||||
"\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
|
||||
sortedNames
|
||||
);
|
||||
} finally {
|
||||
@@ -8485,7 +8485,7 @@ function constructClassInstance(workInProgress, ctor, props) {
|
||||
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" +
|
||||
"%s uses %s but also contains the following legacy lifecycles:%s%s%s\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",
|
||||
_componentName,
|
||||
newApiName,
|
||||
foundWillMountName !== null ? "\n " + foundWillMountName : "",
|
||||
@@ -9005,7 +9005,7 @@ var warnForMissingKey = function(child, returnFiber) {};
|
||||
|
||||
error(
|
||||
"Each child in a list should have a unique " +
|
||||
'"key" prop. See https://reactjs.org/link/warning-keys for ' +
|
||||
'"key" prop. See https://react.dev/link/warning-keys for ' +
|
||||
"more information."
|
||||
);
|
||||
};
|
||||
@@ -9042,7 +9042,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
"String refs are a source of potential bugs and should be avoided. " +
|
||||
"We recommend using useRef() or createRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-string-ref",
|
||||
"https://react.dev/link/strict-mode-string-ref",
|
||||
mixedRef
|
||||
);
|
||||
}
|
||||
@@ -9064,7 +9064,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
"Function components cannot have string refs. " +
|
||||
"We recommend using useRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-string-ref"
|
||||
"https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9130,7 +9130,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
"1. You may be adding a ref to a function component\n" +
|
||||
"2. You may be adding a ref to a component that was not created inside a component's render method\n" +
|
||||
"3. You have multiple copies of React loaded\n" +
|
||||
"See https://reactjs.org/link/refs-must-have-owner for more information."
|
||||
"See https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10638,7 +10638,7 @@ function warnOnHookMismatchInDev(currentHookName) {
|
||||
error(
|
||||
"React has detected a change in the order of Hooks called by %s. " +
|
||||
"This will lead to bugs and errors if not fixed. " +
|
||||
"For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n" +
|
||||
"For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n" +
|
||||
" Previous render Next render\n" +
|
||||
" ------------------------------------------------------\n" +
|
||||
"%s" +
|
||||
@@ -10658,7 +10658,7 @@ function throwInvalidHookError() {
|
||||
"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."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12115,7 +12115,7 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
|
||||
"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. " +
|
||||
"You can only call Hooks at the top level of your React function. " +
|
||||
"For more information, see " +
|
||||
"https://reactjs.org/link/rules-of-hooks"
|
||||
"https://react.dev/link/rules-of-hooks"
|
||||
);
|
||||
};
|
||||
|
||||
@@ -13183,7 +13183,7 @@ function logCapturedError(boundary, errorInfo) {
|
||||
if (boundary.tag === HostRoot) {
|
||||
errorBoundaryMessage =
|
||||
"Consider adding an error boundary to your tree to customize error handling behavior.\n" +
|
||||
"Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.";
|
||||
"Visit https://react.dev/link/error-boundaries to learn more about error boundaries.";
|
||||
} else {
|
||||
var errorBoundaryName =
|
||||
getComponentNameFromFiber(boundary) || "Anonymous";
|
||||
@@ -18380,7 +18380,7 @@ function commitHookEffectListMount(flags, finishedWork) {
|
||||
" }\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";
|
||||
} else {
|
||||
addendum = " You returned: " + destroy;
|
||||
}
|
||||
@@ -22072,7 +22072,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) {
|
||||
error(
|
||||
"Cannot update a component (`%s`) while rendering a " +
|
||||
"different component (`%s`). To locate the bad setState() call inside `%s`, " +
|
||||
"follow the stack trace as described in https://reactjs.org/link/setstate-in-render",
|
||||
"follow the stack trace as described in https://react.dev/link/setstate-in-render",
|
||||
setStateComponentName,
|
||||
renderingComponentName,
|
||||
renderingComponentName
|
||||
@@ -22189,7 +22189,7 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber) {
|
||||
"/* assert on the output */\n\n" +
|
||||
"This ensures that you're testing the behavior the user would see " +
|
||||
"in the browser." +
|
||||
" Learn more at https://reactjs.org/link/wrap-tests-with-act",
|
||||
" Learn more at https://react.dev/link/wrap-tests-with-act",
|
||||
getComponentNameFromFiber(fiber)
|
||||
);
|
||||
} finally {
|
||||
@@ -22221,7 +22221,7 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root) {
|
||||
"/* assert on the output */\n\n" +
|
||||
"This ensures that you're testing the behavior the user would see " +
|
||||
"in the browser." +
|
||||
" Learn more at https://reactjs.org/link/wrap-tests-with-act"
|
||||
" Learn more at https://react.dev/link/wrap-tests-with-act"
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -23471,7 +23471,7 @@ function findHostInstanceWithWarning(component, methodName) {
|
||||
"%s was passed an instance of %s which is inside StrictMode. " +
|
||||
"Instead, add a ref directly to the element you want to reference. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-find-node",
|
||||
"https://react.dev/link/strict-mode-find-node",
|
||||
methodName,
|
||||
methodName,
|
||||
componentName
|
||||
@@ -23482,7 +23482,7 @@ function findHostInstanceWithWarning(component, methodName) {
|
||||
"%s was passed an instance of %s which renders StrictMode children. " +
|
||||
"Instead, add a ref directly to the element you want to reference. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-find-node",
|
||||
"https://react.dev/link/strict-mode-find-node",
|
||||
methodName,
|
||||
methodName,
|
||||
componentName
|
||||
|
||||
+3
-3
@@ -2782,7 +2782,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
if (element) {
|
||||
if (1 !== element.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref"
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = element.stateNode;
|
||||
}
|
||||
@@ -2817,7 +2817,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
returnFiber +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information."
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
return returnFiber;
|
||||
@@ -3533,7 +3533,7 @@ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
globalClientIdCounter = 0;
|
||||
function throwInvalidHookError() {
|
||||
throw Error(
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
);
|
||||
}
|
||||
function areHookInputsEqual(nextDeps, prevDeps) {
|
||||
|
||||
+3
-3
@@ -2841,7 +2841,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
if (element) {
|
||||
if (1 !== element.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref"
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = element.stateNode;
|
||||
}
|
||||
@@ -2876,7 +2876,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
returnFiber +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information."
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
return returnFiber;
|
||||
@@ -3592,7 +3592,7 @@ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
globalClientIdCounter = 0;
|
||||
function throwInvalidHookError() {
|
||||
throw Error(
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
);
|
||||
}
|
||||
function areHookInputsEqual(nextDeps, prevDeps) {
|
||||
|
||||
+27
-27
@@ -286,7 +286,7 @@ var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
|
||||
error = new Error(
|
||||
"A cross-origin error was thrown. React doesn't have access to " +
|
||||
"the actual error object in development. " +
|
||||
"See https://reactjs.org/link/crossorigin-error for more information."
|
||||
"See https://react.dev/link/crossorigin-error for more information."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -857,7 +857,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
|
||||
"This synthetic event is reused for performance reasons. If you're seeing this, " +
|
||||
"you're %s `%s` on a released/nullified synthetic event. %s. " +
|
||||
"If you must keep the original synthetic event around, use event.persist(). " +
|
||||
"See https://reactjs.org/link/event-pooling for more information.",
|
||||
"See https://react.dev/link/event-pooling for more information.",
|
||||
action,
|
||||
propName,
|
||||
result
|
||||
@@ -4314,7 +4314,7 @@ function injectInternals(internals) {
|
||||
error(
|
||||
"The installed version of React DevTools is too old and will not work " +
|
||||
"with the current version of React. Please update React DevTools. " +
|
||||
"https://reactjs.org/link/react-devtools"
|
||||
"https://react.dev/link/react-devtools"
|
||||
);
|
||||
} // DevTools exists, even though it doesn't support Fiber.
|
||||
|
||||
@@ -6734,7 +6734,7 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
error(
|
||||
"Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" +
|
||||
"\nPlease update the following components: %s",
|
||||
sortedNames
|
||||
@@ -6749,11 +6749,11 @@ var ReactStrictModeWarnings = {
|
||||
error(
|
||||
"Using UNSAFE_componentWillReceiveProps in strict mode is not recommended " +
|
||||
"and may indicate bugs in your code. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"* 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\n" +
|
||||
"static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n" +
|
||||
"\nPlease update the following components: %s",
|
||||
_sortedNames
|
||||
);
|
||||
@@ -6767,7 +6767,7 @@ var ReactStrictModeWarnings = {
|
||||
error(
|
||||
"Using UNSAFE_componentWillUpdate in strict mode is not recommended " +
|
||||
"and may indicate bugs in your code. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"\nPlease update the following components: %s",
|
||||
_sortedNames2
|
||||
@@ -6779,7 +6779,7 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
warn(
|
||||
"componentWillMount has been renamed, and is not recommended for use. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" +
|
||||
"* Rename componentWillMount to UNSAFE_componentWillMount to suppress " +
|
||||
"this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " +
|
||||
@@ -6797,11 +6797,11 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
warn(
|
||||
"componentWillReceiveProps has been renamed, and is not recommended for use. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"* 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\n" +
|
||||
"static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n" +
|
||||
"* 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 " +
|
||||
@@ -6816,7 +6816,7 @@ var ReactStrictModeWarnings = {
|
||||
|
||||
warn(
|
||||
"componentWillUpdate has been renamed, and is not recommended for use. " +
|
||||
"See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
||||
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
||||
"* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress " +
|
||||
"this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " +
|
||||
@@ -6889,7 +6889,7 @@ var ReactStrictModeWarnings = {
|
||||
"\n\nThe old API will be supported in all 16.x releases, but applications " +
|
||||
"using it should migrate to the new version." +
|
||||
"\n\nPlease update the following components: %s" +
|
||||
"\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",
|
||||
"\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
|
||||
sortedNames
|
||||
);
|
||||
} finally {
|
||||
@@ -8591,7 +8591,7 @@ function constructClassInstance(workInProgress, ctor, props) {
|
||||
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" +
|
||||
"%s uses %s but also contains the following legacy lifecycles:%s%s%s\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",
|
||||
_componentName,
|
||||
newApiName,
|
||||
foundWillMountName !== null ? "\n " + foundWillMountName : "",
|
||||
@@ -9111,7 +9111,7 @@ var warnForMissingKey = function(child, returnFiber) {};
|
||||
|
||||
error(
|
||||
"Each child in a list should have a unique " +
|
||||
'"key" prop. See https://reactjs.org/link/warning-keys for ' +
|
||||
'"key" prop. See https://react.dev/link/warning-keys for ' +
|
||||
"more information."
|
||||
);
|
||||
};
|
||||
@@ -9148,7 +9148,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
"String refs are a source of potential bugs and should be avoided. " +
|
||||
"We recommend using useRef() or createRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-string-ref",
|
||||
"https://react.dev/link/strict-mode-string-ref",
|
||||
mixedRef
|
||||
);
|
||||
}
|
||||
@@ -9170,7 +9170,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
"Function components cannot have string refs. " +
|
||||
"We recommend using useRef() instead. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-string-ref"
|
||||
"https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9236,7 +9236,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
"1. You may be adding a ref to a function component\n" +
|
||||
"2. You may be adding a ref to a component that was not created inside a component's render method\n" +
|
||||
"3. You have multiple copies of React loaded\n" +
|
||||
"See https://reactjs.org/link/refs-must-have-owner for more information."
|
||||
"See https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10744,7 +10744,7 @@ function warnOnHookMismatchInDev(currentHookName) {
|
||||
error(
|
||||
"React has detected a change in the order of Hooks called by %s. " +
|
||||
"This will lead to bugs and errors if not fixed. " +
|
||||
"For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n" +
|
||||
"For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n" +
|
||||
" Previous render Next render\n" +
|
||||
" ------------------------------------------------------\n" +
|
||||
"%s" +
|
||||
@@ -10764,7 +10764,7 @@ function throwInvalidHookError() {
|
||||
"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."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12221,7 +12221,7 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
|
||||
"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. " +
|
||||
"You can only call Hooks at the top level of your React function. " +
|
||||
"For more information, see " +
|
||||
"https://reactjs.org/link/rules-of-hooks"
|
||||
"https://react.dev/link/rules-of-hooks"
|
||||
);
|
||||
};
|
||||
|
||||
@@ -13289,7 +13289,7 @@ function logCapturedError(boundary, errorInfo) {
|
||||
if (boundary.tag === HostRoot) {
|
||||
errorBoundaryMessage =
|
||||
"Consider adding an error boundary to your tree to customize error handling behavior.\n" +
|
||||
"Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.";
|
||||
"Visit https://react.dev/link/error-boundaries to learn more about error boundaries.";
|
||||
} else {
|
||||
var errorBoundaryName =
|
||||
getComponentNameFromFiber(boundary) || "Anonymous";
|
||||
@@ -18324,7 +18324,7 @@ function commitHookEffectListMount(flags, finishedWork) {
|
||||
" }\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";
|
||||
} else {
|
||||
addendum = " You returned: " + destroy;
|
||||
}
|
||||
@@ -22401,7 +22401,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) {
|
||||
error(
|
||||
"Cannot update a component (`%s`) while rendering a " +
|
||||
"different component (`%s`). To locate the bad setState() call inside `%s`, " +
|
||||
"follow the stack trace as described in https://reactjs.org/link/setstate-in-render",
|
||||
"follow the stack trace as described in https://react.dev/link/setstate-in-render",
|
||||
setStateComponentName,
|
||||
renderingComponentName,
|
||||
renderingComponentName
|
||||
@@ -22518,7 +22518,7 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber) {
|
||||
"/* assert on the output */\n\n" +
|
||||
"This ensures that you're testing the behavior the user would see " +
|
||||
"in the browser." +
|
||||
" Learn more at https://reactjs.org/link/wrap-tests-with-act",
|
||||
" Learn more at https://react.dev/link/wrap-tests-with-act",
|
||||
getComponentNameFromFiber(fiber)
|
||||
);
|
||||
} finally {
|
||||
@@ -22550,7 +22550,7 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root) {
|
||||
"/* assert on the output */\n\n" +
|
||||
"This ensures that you're testing the behavior the user would see " +
|
||||
"in the browser." +
|
||||
" Learn more at https://reactjs.org/link/wrap-tests-with-act"
|
||||
" Learn more at https://react.dev/link/wrap-tests-with-act"
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -23800,7 +23800,7 @@ function findHostInstanceWithWarning(component, methodName) {
|
||||
"%s was passed an instance of %s which is inside StrictMode. " +
|
||||
"Instead, add a ref directly to the element you want to reference. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-find-node",
|
||||
"https://react.dev/link/strict-mode-find-node",
|
||||
methodName,
|
||||
methodName,
|
||||
componentName
|
||||
@@ -23811,7 +23811,7 @@ function findHostInstanceWithWarning(component, methodName) {
|
||||
"%s was passed an instance of %s which renders StrictMode children. " +
|
||||
"Instead, add a ref directly to the element you want to reference. " +
|
||||
"Learn more about using refs safely here: " +
|
||||
"https://reactjs.org/link/strict-mode-find-node",
|
||||
"https://react.dev/link/strict-mode-find-node",
|
||||
methodName,
|
||||
methodName,
|
||||
componentName
|
||||
|
||||
+3
-3
@@ -2745,7 +2745,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
if (element) {
|
||||
if (1 !== element.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref"
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = element.stateNode;
|
||||
}
|
||||
@@ -2780,7 +2780,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
returnFiber +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information."
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
return returnFiber;
|
||||
@@ -3496,7 +3496,7 @@ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
globalClientIdCounter = 0;
|
||||
function throwInvalidHookError() {
|
||||
throw Error(
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
);
|
||||
}
|
||||
function areHookInputsEqual(nextDeps, prevDeps) {
|
||||
|
||||
+3
-3
@@ -2804,7 +2804,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
if (element) {
|
||||
if (1 !== element.tag)
|
||||
throw Error(
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref"
|
||||
"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref"
|
||||
);
|
||||
var inst = element.stateNode;
|
||||
}
|
||||
@@ -2839,7 +2839,7 @@ function coerceRef(returnFiber, current, element) {
|
||||
throw Error(
|
||||
"Element ref was specified as a string (" +
|
||||
returnFiber +
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information."
|
||||
") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://react.dev/link/refs-must-have-owner for more information."
|
||||
);
|
||||
}
|
||||
return returnFiber;
|
||||
@@ -3555,7 +3555,7 @@ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
|
||||
globalClientIdCounter = 0;
|
||||
function throwInvalidHookError() {
|
||||
throw Error(
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
||||
);
|
||||
}
|
||||
function areHookInputsEqual(nextDeps, prevDeps) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import {useContext} from 'react';
|
||||
* This is a React Context that provides a scoped instance of IPerformanceLogger.
|
||||
* We wrap every <AppContainer /> with a Provider for this context so the logger
|
||||
* should be available in every component.
|
||||
* See React docs about using Context: https://reactjs.org/docs/context.html
|
||||
* See React docs about using Context: https://react.dev/docs/context.html
|
||||
*/
|
||||
const PerformanceLoggerContext: React.Context<IPerformanceLogger> =
|
||||
React.createContext(GlobalPerformanceLogger);
|
||||
|
||||
@@ -14,7 +14,7 @@ import * as React from 'react';
|
||||
/**
|
||||
* `setState` is called asynchronously, and should not rely on the value of
|
||||
* `this.props` or `this.state`:
|
||||
* https://reactjs.org/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous
|
||||
* https://react.dev/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous
|
||||
*
|
||||
* SafePureComponent adds runtime enforcement, to catch cases where these
|
||||
* variables are read in a state updater function, instead of the ones passed
|
||||
|
||||
Reference in New Issue
Block a user