Skip to content

Commit

Permalink
Fix areHookInputsEqual method warning params order (#15345)
Browse files Browse the repository at this point in the history
* Fix areHookInputsEqual method  warning params order

* FIX areHookInputsEqual test
  • Loading branch information
brickspert authored and Sunil Pai committed Apr 8, 2019
1 parent 29fb586 commit b4bc33a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ function areHookInputsEqual(
'Previous: %s\n' +
'Incoming: %s',
currentHookNameInDev,
`[${nextDeps.join(', ')}]`,
`[${prevDeps.join(', ')}]`,
`[${nextDeps.join(', ')}]`,
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]);
});

Expand Down

0 comments on commit b4bc33a

Please sign in to comment.