@samitouri / QOS-React-2 / commits / b4bc33a584

Fix areHookInputsEqual method warning params order (#15345)

* Fix areHookInputsEqual method warning params order * FIX areHookInputsEqual test

砖家 committed Apr 9, 2019 at 00:14 UTC b4bc33a58496f54c2ac6e823dca3c41ecbb6454c
2 files changed +3 -3
packages/react-reconciler/src/ReactFiberHooks.js
+1 -1
@@ -315,8 +315,8 @@ function areHookInputsEqual(
315 'Previous: %s\n' +
316 'Incoming: %s',
317 currentHookNameInDev,
318 - `[${nextDeps.join(', ')}]`,
318 `[${prevDeps.join(', ')}]`,
319 + `[${nextDeps.join(', ')}]`,
320 );
321 }
322 }
packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
+2 -2
@@ -608,8 +608,8 @@ describe('ReactHooks', () => {
608 'Warning: The final argument passed to useLayoutEffect changed size ' +
609 'between renders. The order and size of this array must remain ' +
610 'constant.\n\n' +
611 - 'Previous: [A, B]\n' +
612 - 'Incoming: [A]\n',
611 + 'Previous: [A]\n' +
612 + 'Incoming: [A, B]\n',
613 ]);
614 });
615