From cd3f2d54fe7aa00b7fbda95ffe7ee8add64b7001 Mon Sep 17 00:00:00 2001 From: Linchengyi Date: Thu, 10 Jan 2019 15:03:59 +0800 Subject: [PATCH] Update ReactStrictModeWarnings.js fix typo --- packages/react-reconciler/src/ReactStrictModeWarnings.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-reconciler/src/ReactStrictModeWarnings.js b/packages/react-reconciler/src/ReactStrictModeWarnings.js index d6c8122e6c436..143e7ebd4a7b9 100644 --- a/packages/react-reconciler/src/ReactStrictModeWarnings.js +++ b/packages/react-reconciler/src/ReactStrictModeWarnings.js @@ -72,7 +72,7 @@ if (__DEV__) { ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = () => { ((pendingUnsafeLifecycleWarnings: any): FiberToLifecycleMap).forEach( (lifecycleWarningsMap, strictRoot) => { - const lifecyclesWarningMesages = []; + const lifecyclesWarningMessages = []; Object.keys(lifecycleWarningsMap).forEach(lifecycle => { const lifecycleWarnings = lifecycleWarningsMap[lifecycle]; @@ -87,14 +87,14 @@ if (__DEV__) { const suggestion = LIFECYCLE_SUGGESTIONS[lifecycle]; const sortedComponentNames = setToSortedString(componentNames); - lifecyclesWarningMesages.push( + lifecyclesWarningMessages.push( `${formatted}: Please update the following components to use ` + `${suggestion} instead: ${sortedComponentNames}`, ); } }); - if (lifecyclesWarningMesages.length > 0) { + if (lifecyclesWarningMessages.length > 0) { const strictRootComponentStack = getStackByFiberInDevAndProd( strictRoot, ); @@ -106,7 +106,7 @@ if (__DEV__) { '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, - lifecyclesWarningMesages.join('\n\n'), + lifecyclesWarningMessages.join('\n\n'), ); } },