diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js index 80707120e95fc..975d4ada3f7df 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.js +++ b/packages/react-reconciler/src/ReactFiberHooks.js @@ -315,8 +315,8 @@ function areHookInputsEqual( 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, - `[${nextDeps.join(', ')}]`, `[${prevDeps.join(', ')}]`, + `[${nextDeps.join(', ')}]`, ); } } diff --git a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js index 1de8540a6eeb5..e2e5178ba37f5 100644 --- a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js @@ -608,8 +608,8 @@ describe('ReactHooks', () => { 'Warning: The final argument passed to useLayoutEffect changed size ' + 'between renders. The order and size of this array must remain ' + 'constant.\n\n' + - 'Previous: [A, B]\n' + - 'Incoming: [A]\n', + 'Previous: [A]\n' + + 'Incoming: [A, B]\n', ]); });