GeezerVison is showing github.com — Make component stack last argument for deprecation warnings (#16384) · react/react@e0a521b
File treeExpand file treeCollapse file tree Open diff view settings react-native-renderer/src/__tests__
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-dom/src/__tests__/ReactDeprecationWarnings-test.internal.js +4-6Lines changed: 4 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -64,12 +64,10 @@ describe('ReactDeprecationWarnings', () => { | 64 | 64 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 65 | 65 | 'Warning: Component "Component" contains the string ref "refComponent". ' + | 66 | 66 | 'Support for string refs will be removed in a future major release. ' + | 67 | | - 'We recommend using useRef() or createRef() instead.' + | 68 | | - '\n\n' + | 69 | | - ' in Component (at **)' + | 70 | | - '\n\n' + | 71 | | - 'Learn more about using refs safely here:\n' + | 72 | | - 'https://fb.me/react-strict-mode-string-ref', | | 67 | + 'We recommend using useRef() or createRef() instead. ' + | | 68 | + 'Learn more about using refs safely here: ' + | | 69 | + 'https://fb.me/react-strict-mode-string-ref' + | | 70 | + '\n in Component (at **)', | 73 | 71 | ); | 74 | 72 | }); | 75 | 73 | }); |
Collapse file Copy file name to clipboardExpand all lines: packages/react-dom/src/__tests__/findDOMNode-test.js +8-12Lines changed: 8 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -120,14 +120,12 @@ describe('findDOMNode', () => { | 120 | 120 | expect(() => (match = ReactDOM.findDOMNode(parent))).toWarnDev([ | 121 | 121 | 'Warning: findDOMNode is deprecated in StrictMode. ' + | 122 | 122 | 'findDOMNode was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + | 123 | | - 'Instead, add a ref directly to the element you want to reference.' + | 124 | | - '\n' + | | 123 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 124 | + 'Learn more about using refs safely here: ' + | | 125 | + 'https://fb.me/react-strict-mode-find-node' + | 125 | 126 | '\n in div (at **)' + | 126 | 127 | '\n in StrictMode (at **)' + | 127 | | - '\n in ContainsStrictModeChild (at **)' + | 128 | | - '\n' + | 129 | | - '\nLearn more about using refs safely here:' + | 130 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 128 | + '\n in ContainsStrictModeChild (at **)', | 131 | 129 | ]); | 132 | 130 | expect(match).toBe(child); | 133 | 131 | }); | @@ -152,14 +150,12 @@ describe('findDOMNode', () => { | 152 | 150 | expect(() => (match = ReactDOM.findDOMNode(parent))).toWarnDev([ | 153 | 151 | 'Warning: findDOMNode is deprecated in StrictMode. ' + | 154 | 152 | 'findDOMNode was passed an instance of IsInStrictMode which is inside StrictMode. ' + | 155 | | - 'Instead, add a ref directly to the element you want to reference.' + | 156 | | - '\n' + | | 153 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 154 | + 'Learn more about using refs safely here: ' + | | 155 | + 'https://fb.me/react-strict-mode-find-node' + | 157 | 156 | '\n in div (at **)' + | 158 | 157 | '\n in IsInStrictMode (at **)' + | 159 | | - '\n in StrictMode (at **)' + | 160 | | - '\n' + | 161 | | - '\nLearn more about using refs safely here:' + | 162 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 158 | + '\n in StrictMode (at **)', | 163 | 159 | ]); | 164 | 160 | expect(match).toBe(child); | 165 | 161 | }); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js +8-12Lines changed: 8 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -885,14 +885,12 @@ describe('ReactFabric', () => { | 885 | 885 | expect(() => (match = ReactFabric.findNodeHandle(parent))).toWarnDev([ | 886 | 886 | 'Warning: findNodeHandle is deprecated in StrictMode. ' + | 887 | 887 | 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + | 888 | | - 'Instead, add a ref directly to the element you want to reference.' + | 889 | | - '\n' + | | 888 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 889 | + 'Learn more about using refs safely here: ' + | | 890 | + 'https://fb.me/react-strict-mode-find-node' + | 890 | 891 | '\n in RCTView (at **)' + | 891 | 892 | '\n in StrictMode (at **)' + | 892 | | - '\n in ContainsStrictModeChild (at **)' + | 893 | | - '\n' + | 894 | | - '\nLearn more about using refs safely here:' + | 895 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 893 | + '\n in ContainsStrictModeChild (at **)', | 896 | 894 | ]); | 897 | 895 | expect(match).toBe(child._nativeTag); | 898 | 896 | }); | @@ -923,14 +921,12 @@ describe('ReactFabric', () => { | 923 | 921 | expect(() => (match = ReactFabric.findNodeHandle(parent))).toWarnDev([ | 924 | 922 | 'Warning: findNodeHandle is deprecated in StrictMode. ' + | 925 | 923 | 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' + | 926 | | - 'Instead, add a ref directly to the element you want to reference.' + | 927 | | - '\n' + | | 924 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 925 | + 'Learn more about using refs safely here: ' + | | 926 | + 'https://fb.me/react-strict-mode-find-node' + | 928 | 927 | '\n in RCTView (at **)' + | 929 | 928 | '\n in IsInStrictMode (at **)' + | 930 | | - '\n in StrictMode (at **)' + | 931 | | - '\n' + | 932 | | - '\nLearn more about using refs safely here:' + | 933 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 929 | + '\n in StrictMode (at **)', | 934 | 930 | ]); | 935 | 931 | expect(match).toBe(child._nativeTag); | 936 | 932 | }); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js +8-12Lines changed: 8 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -669,14 +669,12 @@ describe('ReactNative', () => { | 669 | 669 | expect(() => (match = ReactNative.findNodeHandle(parent))).toWarnDev([ | 670 | 670 | 'Warning: findNodeHandle is deprecated in StrictMode. ' + | 671 | 671 | 'findNodeHandle was passed an instance of ContainsStrictModeChild which renders StrictMode children. ' + | 672 | | - 'Instead, add a ref directly to the element you want to reference.' + | 673 | | - '\n' + | | 672 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 673 | + 'Learn more about using refs safely here: ' + | | 674 | + 'https://fb.me/react-strict-mode-find-node' + | 674 | 675 | '\n in RCTView (at **)' + | 675 | 676 | '\n in StrictMode (at **)' + | 676 | | - '\n in ContainsStrictModeChild (at **)' + | 677 | | - '\n' + | 678 | | - '\nLearn more about using refs safely here:' + | 679 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 677 | + '\n in ContainsStrictModeChild (at **)', | 680 | 678 | ]); | 681 | 679 | expect(match).toBe(child._nativeTag); | 682 | 680 | }); | @@ -707,14 +705,12 @@ describe('ReactNative', () => { | 707 | 705 | expect(() => (match = ReactNative.findNodeHandle(parent))).toWarnDev([ | 708 | 706 | 'Warning: findNodeHandle is deprecated in StrictMode. ' + | 709 | 707 | 'findNodeHandle was passed an instance of IsInStrictMode which is inside StrictMode. ' + | 710 | | - 'Instead, add a ref directly to the element you want to reference.' + | 711 | | - '\n' + | | 708 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 709 | + 'Learn more about using refs safely here: ' + | | 710 | + 'https://fb.me/react-strict-mode-find-node' + | 712 | 711 | '\n in RCTView (at **)' + | 713 | 712 | '\n in IsInStrictMode (at **)' + | 714 | | - '\n in StrictMode (at **)' + | 715 | | - '\n' + | 716 | | - '\nLearn more about using refs safely here:' + | 717 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 713 | + '\n in StrictMode (at **)', | 718 | 714 | ]); | 719 | 715 | expect(match).toBe(child._nativeTag); | 720 | 716 | }); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactChildFiber.js +6-8Lines changed: 6 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -125,10 +125,9 @@ function coerceRef( | 125 | 125 | false, | 126 | 126 | 'Component "%s" contains the string ref "%s". Support for string refs ' + | 127 | 127 | 'will be removed in a future major release. We recommend using ' + | 128 | | - 'useRef() or createRef() instead.' + | 129 | | - '\n%s' + | 130 | | - '\n\nLearn more about using refs safely here:' + | 131 | | - '\nhttps://fb.me/react-strict-mode-string-ref', | | 128 | + 'useRef() or createRef() instead. ' + | | 129 | + 'Learn more about using refs safely here: ' + | | 130 | + 'https://fb.me/react-strict-mode-string-ref%s', | 132 | 131 | componentName, | 133 | 132 | mixedRef, | 134 | 133 | getStackByFiberInDevAndProd(returnFiber), | @@ -138,10 +137,9 @@ function coerceRef( | 138 | 137 | false, | 139 | 138 | 'A string ref, "%s", has been found within a strict mode tree. ' + | 140 | 139 | 'String refs are a source of potential bugs and should be avoided. ' + | 141 | | - 'We recommend using useRef() or createRef() instead.' + | 142 | | - '\n%s' + | 143 | | - '\n\nLearn more about using refs safely here:' + | 144 | | - '\nhttps://fb.me/react-strict-mode-string-ref', | | 140 | + 'We recommend using useRef() or createRef() instead. ' + | | 141 | + 'Learn more about using refs safely here: ' + | | 142 | + 'https://fb.me/react-strict-mode-string-ref%s', | 145 | 143 | mixedRef, | 146 | 144 | getStackByFiberInDevAndProd(returnFiber), | 147 | 145 | ); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberReconciler.js +6-8Lines changed: 6 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -261,10 +261,9 @@ function findHostInstanceWithWarning( | 261 | 261 | false, | 262 | 262 | '%s is deprecated in StrictMode. ' + | 263 | 263 | '%s was passed an instance of %s which is inside StrictMode. ' + | 264 | | - 'Instead, add a ref directly to the element you want to reference.' + | 265 | | - '\n%s' + | 266 | | - '\n\nLearn more about using refs safely here:' + | 267 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 264 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 265 | + 'Learn more about using refs safely here: ' + | | 266 | + 'https://fb.me/react-strict-mode-find-node%s', | 268 | 267 | methodName, | 269 | 268 | methodName, | 270 | 269 | componentName, | @@ -275,10 +274,9 @@ function findHostInstanceWithWarning( | 275 | 274 | false, | 276 | 275 | '%s is deprecated in StrictMode. ' + | 277 | 276 | '%s was passed an instance of %s which renders StrictMode children. ' + | 278 | | - 'Instead, add a ref directly to the element you want to reference.' + | 279 | | - '\n%s' + | 280 | | - '\n\nLearn more about using refs safely here:' + | 281 | | - '\nhttps://fb.me/react-strict-mode-find-node', | | 277 | + 'Instead, add a ref directly to the element you want to reference. ' + | | 278 | + 'Learn more about using refs safely here: ' + | | 279 | + 'https://fb.me/react-strict-mode-find-node%s', | 282 | 280 | methodName, | 283 | 281 | methodName, | 284 | 282 | componentName, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactStrictModeWarnings.js +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -346,14 +346,14 @@ if (__DEV__) { | 346 | 346 |
| 347 | 347 | warningWithoutStack( | 348 | 348 | false, | 349 | | - 'Legacy context API has been detected within a strict-mode tree: %s' + | | 349 | + 'Legacy context API has been detected within a strict-mode tree.' + | 350 | 350 | '\n\nThe old API will be supported in all 16.x releases, but applications ' + | 351 | 351 | 'using it should migrate to the new version.' + | 352 | 352 | '\n\nPlease update the following components: %s' + | 353 | | - '\n\nLearn more about this warning here:' + | 354 | | - '\nhttps://fb.me/react-legacy-context', | 355 | | - strictRootComponentStack, | | 353 | + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + | | 354 | + '%s', | 356 | 355 | sortedNames, | | 356 | + strictRootComponentStack, | 357 | 357 | ); | 358 | 358 | }, | 359 | 359 | ); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/__tests__/ReactIncremental-test.internal.js +14-14Lines changed: 14 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1913,7 +1913,7 @@ describe('ReactIncremental', () => { | 1913 | 1913 | 'ShowBoth {"locale":"fr"}', | 1914 | 1914 | ]), | 1915 | 1915 | ).toWarnDev( | 1916 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 1916 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 1917 | 1917 | 'The old API will be supported in all 16.x releases, but applications ' + | 1918 | 1918 | 'using it should migrate to the new version.\n\n' + | 1919 | 1919 | 'Please update the following components: Intl, ShowBoth, ShowLocale', | @@ -1970,7 +1970,7 @@ describe('ReactIncremental', () => { | 1970 | 1970 | 'ShowBoth {"locale":"en"}', | 1971 | 1971 | ]), | 1972 | 1972 | ).toWarnDev( | 1973 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 1973 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 1974 | 1974 | 'The old API will be supported in all 16.x releases, but applications ' + | 1975 | 1975 | 'using it should migrate to the new version.\n\n' + | 1976 | 1976 | 'Please update the following components: Router, ShowRoute', | @@ -2001,7 +2001,7 @@ describe('ReactIncremental', () => { | 2001 | 2001 |
| 2002 | 2002 | ReactNoop.render(<Recurse />); | 2003 | 2003 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2004 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2004 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2005 | 2005 | 'The old API will be supported in all 16.x releases, but applications ' + | 2006 | 2006 | 'using it should migrate to the new version.\n\n' + | 2007 | 2007 | 'Please update the following components: Recurse', | @@ -2046,7 +2046,7 @@ describe('ReactIncremental', () => { | 2046 | 2046 | "If you can't use a class try assigning the prototype on the function as a workaround. " + | 2047 | 2047 | '`Recurse.prototype = React.Component.prototype`. ' + | 2048 | 2048 | "Don't use an arrow function since it cannot be called with `new` by React.", | 2049 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2049 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2050 | 2050 | 'The old API will be supported in all 16.x releases, but applications ' + | 2051 | 2051 | 'using it should migrate to the new version.\n\n' + | 2052 | 2052 | 'Please update the following components: Recurse', | @@ -2114,7 +2114,7 @@ describe('ReactIncremental', () => { | 2114 | 2114 | 'ShowLocale {"locale":"ru"}', | 2115 | 2115 | ]), | 2116 | 2116 | ).toWarnDev( | 2117 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2117 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2118 | 2118 | 'The old API will be supported in all 16.x releases, but applications ' + | 2119 | 2119 | 'using it should migrate to the new version.\n\n' + | 2120 | 2120 | 'Please update the following components: Intl, ShowLocale', | @@ -2195,7 +2195,7 @@ describe('ReactIncremental', () => { | 2195 | 2195 | </Intl>, | 2196 | 2196 | ); | 2197 | 2197 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2198 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2198 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2199 | 2199 | 'The old API will be supported in all 16.x releases, but applications ' + | 2200 | 2200 | 'using it should migrate to the new version.\n\n' + | 2201 | 2201 | 'Please update the following components: Intl, ShowLocaleClass, ShowLocaleFn', | @@ -2289,7 +2289,7 @@ describe('ReactIncremental', () => { | 2289 | 2289 | </Stateful>, | 2290 | 2290 | ); | 2291 | 2291 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2292 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2292 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2293 | 2293 | 'The old API will be supported in all 16.x releases, but applications ' + | 2294 | 2294 | 'using it should migrate to the new version.\n\n' + | 2295 | 2295 | 'Please update the following components: Intl, ShowLocaleClass, ShowLocaleFn', | @@ -2360,7 +2360,7 @@ describe('ReactIncremental', () => { | 2360 | 2360 | // Init | 2361 | 2361 | ReactNoop.render(<Root />); | 2362 | 2362 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2363 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2363 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2364 | 2364 | 'The old API will be supported in all 16.x releases, but applications ' + | 2365 | 2365 | 'using it should migrate to the new version.\n\n' + | 2366 | 2366 | 'Please update the following components: Child', | @@ -2412,7 +2412,7 @@ describe('ReactIncremental', () => { | 2412 | 2412 | // Init | 2413 | 2413 | ReactNoop.render(<Root />); | 2414 | 2414 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2415 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2415 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2416 | 2416 | 'The old API will be supported in all 16.x releases, but applications ' + | 2417 | 2417 | 'using it should migrate to the new version.\n\n' + | 2418 | 2418 | 'Please update the following components: ContextProvider', | @@ -2465,7 +2465,7 @@ describe('ReactIncremental', () => { | 2465 | 2465 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2466 | 2466 | [ | 2467 | 2467 | 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended', | 2468 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2468 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2469 | 2469 | 'The old API will be supported in all 16.x releases, but applications ' + | 2470 | 2470 | 'using it should migrate to the new version.\n\n' + | 2471 | 2471 | 'Please update the following components: MyComponent', | @@ -2614,7 +2614,7 @@ describe('ReactIncremental', () => { | 2614 | 2614 | ); | 2615 | 2615 |
| 2616 | 2616 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2617 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2617 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2618 | 2618 | 'The old API will be supported in all 16.x releases, but applications ' + | 2619 | 2619 | 'using it should migrate to the new version.\n\n' + | 2620 | 2620 | 'Please update the following components: Child, TopContextProvider', | @@ -2678,7 +2678,7 @@ describe('ReactIncremental', () => { | 2678 | 2678 | ); | 2679 | 2679 |
| 2680 | 2680 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2681 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2681 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2682 | 2682 | 'The old API will be supported in all 16.x releases, but applications ' + | 2683 | 2683 | 'using it should migrate to the new version.\n\n' + | 2684 | 2684 | 'Please update the following components: Child, MiddleContextProvider, TopContextProvider', | @@ -2751,7 +2751,7 @@ describe('ReactIncremental', () => { | 2751 | 2751 | ); | 2752 | 2752 |
| 2753 | 2753 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2754 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2754 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2755 | 2755 | 'The old API will be supported in all 16.x releases, but applications ' + | 2756 | 2756 | 'using it should migrate to the new version.\n\n' + | 2757 | 2757 | 'Please update the following components: Child, MiddleContextProvider, TopContextProvider', | @@ -2834,7 +2834,7 @@ describe('ReactIncremental', () => { | 2834 | 2834 | ); | 2835 | 2835 |
| 2836 | 2836 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 2837 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 2837 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 2838 | 2838 | 'The old API will be supported in all 16.x releases, but applications ' + | 2839 | 2839 | 'using it should migrate to the new version.\n\n' + | 2840 | 2840 | 'Please update the following components: Child, MiddleContextProvider, TopContextProvider', | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1118,7 +1118,7 @@ describe('ReactIncrementalErrorHandling', () => { | 1118 | 1118 | </Provider>, | 1119 | 1119 | ); | 1120 | 1120 | expect(() => expect(Scheduler).toFlushWithoutYielding()).toWarnDev( | 1121 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 1121 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 1122 | 1122 | 'The old API will be supported in all 16.x releases, but ' + | 1123 | 1123 | 'applications using it should migrate to the new version.\n\n' + | 1124 | 1124 | 'Please update the following components: Connector, Provider', | @@ -1621,7 +1621,7 @@ describe('ReactIncrementalErrorHandling', () => { | 1621 | 1621 | "If you can't use a class try assigning the prototype on the function as a workaround. " + | 1622 | 1622 | '`Provider.prototype = React.Component.prototype`. ' + | 1623 | 1623 | "Don't use an arrow function since it cannot be called with `new` by React.", | 1624 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 1624 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 1625 | 1625 | 'The old API will be supported in all 16.x releases, but ' + | 1626 | 1626 | 'applications using it should migrate to the new version.\n\n' + | 1627 | 1627 | 'Please update the following components: Provider', | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/__tests__/ReactNewContext-test.internal.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1196,7 +1196,7 @@ describe('ReactNewContext', () => { | 1196 | 1196 | expect(() => { | 1197 | 1197 | expect(Scheduler).toFlushAndYield(['LegacyProvider', 'App', 'Child']); | 1198 | 1198 | }).toWarnDev( | 1199 | | - 'Legacy context API has been detected within a strict-mode tree: \n\n' + | | 1199 | + 'Legacy context API has been detected within a strict-mode tree.\n\n' + | 1200 | 1200 | 'The old API will be supported in all 16.x releases, but applications ' + | 1201 | 1201 | 'using it should migrate to the new version.\n\n' + | 1202 | 1202 | 'Please update the following components: LegacyProvider', | |
|