Skip to content

Commit f225b46

Browse files
committed
Updated strict-mode fb.me link (and tests)
1 parent 67aec16 commit f225b46

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

packages/react-reconciler/src/ReactStrictModeWarnings.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ if (__DEV__) {
7777

7878
warning(
7979
false,
80-
'Unsafe lifecycle methods were found within the following async tree:%s' +
80+
'Unsafe lifecycle methods were found within a strict-mode tree:%s' +
8181
'\n\n%s' +
8282
'\n\nLearn more about this warning here:' +
83-
'\nhttps://fb.me/react-async-component-lifecycle-hooks',
83+
'\nhttps://fb.me/react-strict-mode-warnings',
8484
strictRootComponentStack,
8585
lifecyclesWarningMesages.join('\n\n'),
8686
);

packages/react/src/__tests__/ReactAsyncClassComponent-test.internal.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('ReactAsyncClassComponent', () => {
194194
expect(() => {
195195
rendered = ReactTestRenderer.create(<SyncRoot />);
196196
}).toWarnDev(
197-
'Unsafe lifecycle methods were found within the following async tree:' +
197+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
198198
'\n in AsyncRoot (at **)' +
199199
'\n in SyncRoot (at **)' +
200200
'\n\ncomponentWillMount: Please update the following components ' +
@@ -204,7 +204,7 @@ describe('ReactAsyncClassComponent', () => {
204204
'\n\ncomponentWillUpdate: Please update the following components ' +
205205
'to use componentDidUpdate instead: AsyncRoot' +
206206
'\n\nLearn more about this warning here:' +
207-
'\nhttps://fb.me/react-async-component-lifecycle-hooks',
207+
'\nhttps://fb.me/react-strict-mode-warnings',
208208
);
209209

210210
// Dedupe
@@ -248,7 +248,7 @@ describe('ReactAsyncClassComponent', () => {
248248
expect(
249249
() => (rendered = ReactTestRenderer.create(<SyncRoot />)),
250250
).toWarnDev(
251-
'Unsafe lifecycle methods were found within the following async tree:' +
251+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
252252
'\n in AsyncRoot (at **)' +
253253
'\n in SyncRoot (at **)' +
254254
'\n\ncomponentWillMount: Please update the following components ' +
@@ -258,7 +258,7 @@ describe('ReactAsyncClassComponent', () => {
258258
'\n\ncomponentWillUpdate: Please update the following components ' +
259259
'to use componentDidUpdate instead: AsyncRoot, Parent' +
260260
'\n\nLearn more about this warning here:' +
261-
'\nhttps://fb.me/react-async-component-lifecycle-hooks',
261+
'\nhttps://fb.me/react-strict-mode-warnings',
262262
);
263263

264264
// Dedupe
@@ -322,13 +322,13 @@ describe('ReactAsyncClassComponent', () => {
322322
expect(
323323
() => (rendered = ReactTestRenderer.create(<SyncRoot />)),
324324
).toWarnDev([
325-
'Unsafe lifecycle methods were found within the following async tree:' +
325+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
326326
'\n in AsyncRootOne (at **)' +
327327
'\n in div (at **)' +
328328
'\n in SyncRoot (at **)' +
329329
'\n\ncomponentWillMount: Please update the following components ' +
330330
'to use componentDidMount instead: Bar, Foo',
331-
'Unsafe lifecycle methods were found within the following async tree:' +
331+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
332332
'\n in AsyncRootTwo (at **)' +
333333
'\n in div (at **)' +
334334
'\n in SyncRoot (at **)' +
@@ -364,21 +364,21 @@ describe('ReactAsyncClassComponent', () => {
364364
expect(() => {
365365
rendered = ReactTestRenderer.create(<AsyncRoot foo={true} />);
366366
}).toWarnDev(
367-
'Unsafe lifecycle methods were found within the following async tree:' +
367+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
368368
'\n in AsyncRoot (at **)' +
369369
'\n\ncomponentWillMount: Please update the following components ' +
370370
'to use componentDidMount instead: Foo' +
371371
'\n\nLearn more about this warning here:' +
372-
'\nhttps://fb.me/react-async-component-lifecycle-hooks',
372+
'\nhttps://fb.me/react-strict-mode-warnings',
373373
);
374374

375375
expect(() => rendered.update(<AsyncRoot foo={false} />)).toWarnDev(
376-
'Unsafe lifecycle methods were found within the following async tree:' +
376+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
377377
'\n in AsyncRoot (at **)' +
378378
'\n\ncomponentWillMount: Please update the following components ' +
379379
'to use componentDidMount instead: Bar' +
380380
'\n\nLearn more about this warning here:' +
381-
'\nhttps://fb.me/react-async-component-lifecycle-hooks',
381+
'\nhttps://fb.me/react-strict-mode-warnings',
382382
);
383383

384384
// Dedupe
@@ -422,12 +422,12 @@ describe('ReactAsyncClassComponent', () => {
422422
expect(() => {
423423
ReactTestRenderer.create(<AsyncRoot foo={true} />);
424424
}).toWarnDev(
425-
'Unsafe lifecycle methods were found within the following async tree:' +
425+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
426426
'\n in AsyncRoot (at **)' +
427427
'\n\ncomponentWillMount: Please update the following components ' +
428428
'to use componentDidMount instead: Bar' +
429429
'\n\nLearn more about this warning here:' +
430-
'\nhttps://fb.me/react-async-component-lifecycle-hooks',
430+
'\nhttps://fb.me/react-strict-mode-warnings',
431431
);
432432

433433
expect(caughtError).not.toBe(null);
@@ -470,15 +470,15 @@ describe('ReactAsyncClassComponent', () => {
470470
}
471471

472472
expect(() => ReactTestRenderer.create(<SyncRoot />)).toWarnDev(
473-
'Unsafe lifecycle methods were found within the following async tree:' +
473+
'Unsafe lifecycle methods were found within a strict-mode tree:' +
474474
'\n in PreAsyncRoot (at **)' +
475475
'\n in SyncRoot (at **)' +
476476
'\n\ncomponentWillMount: Please update the following components ' +
477477
'to use componentDidMount instead: PreAsyncRoot' +
478478
'\n\ncomponentWillReceiveProps: Please update the following components ' +
479479
'to use static getDerivedStateFromProps instead: Bar, Foo' +
480480
'\n\nLearn more about this warning here:' +
481-
'\nhttps://fb.me/react-async-component-lifecycle-hooks',
481+
'\nhttps://fb.me/react-strict-mode-warnings',
482482
);
483483

484484
// Dedupe

0 commit comments

Comments
 (0)