Skip to content

Commit 5c8fcff

Browse files
committed
Improve legacy context strict mode warning message
1 parent 09f0569 commit 5c8fcff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/react-reconciler/src/ReactStrictModeWarnings.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,13 @@ if (__DEV__) {
338338

339339
runWithFiberInDEV(firstFiber, () => {
340340
console.error(
341-
'Legacy context API has been detected within a strict-mode tree.' +
342-
'\n\nThe old API will be supported in all 16.x releases, but applications ' +
343-
'using it should migrate to the new version.' +
344-
'\n\nPlease update the following components: %s' +
345-
'\n\nLearn more about this warning here: https://react.dev/link/legacy-context',
341+
'Legacy context API detected inside a StrictMode tree.\n\n' +
342+
'Support for the legacy API will eventually be removed. ' +
343+
'Please migrate the following components to the modern context API:\n\n%s\n\n' +
344+
'More info: https://react.dev/link/legacy-context',
346345
sortedNames,
347346
);
347+
348348
});
349349
},
350350
);

0 commit comments

Comments
 (0)