Skip to content

Commit b4bc33a

Browse files
brickspertSunil Pai
authored and
Sunil Pai
committed
Fix areHookInputsEqual method warning params order (#15345)
* Fix areHookInputsEqual method warning params order * FIX areHookInputsEqual test
1 parent 29fb586 commit b4bc33a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/react-reconciler/src/ReactFiberHooks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ function areHookInputsEqual(
315315
'Previous: %s\n' +
316316
'Incoming: %s',
317317
currentHookNameInDev,
318-
`[${nextDeps.join(', ')}]`,
319318
`[${prevDeps.join(', ')}]`,
319+
`[${nextDeps.join(', ')}]`,
320320
);
321321
}
322322
}

packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,8 @@ describe('ReactHooks', () => {
608608
'Warning: The final argument passed to useLayoutEffect changed size ' +
609609
'between renders. The order and size of this array must remain ' +
610610
'constant.\n\n' +
611-
'Previous: [A, B]\n' +
612-
'Incoming: [A]\n',
611+
'Previous: [A]\n' +
612+
'Incoming: [A, B]\n',
613613
]);
614614
});
615615

0 commit comments

Comments
 (0)