Skip to content

Commit

Permalink
Clarify key ordering requirement
Browse files Browse the repository at this point in the history
See: #6363 (comment)
Co-Authored-By: Zach Margolis <zbmargolis@gmail.com>
  • Loading branch information
aduth and zachmargolis committed May 17, 2022
1 parent efb20d7 commit 2bb9dcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/javascript/packages/react-hooks/use-object-memo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { useMemo } from 'react';
* This can be useful in situations like object context values, since without memoization an object
* context would trigger re-renders of all consumers on every update.
*
* Note that the keys of the object must remain the same for the lifecycle of the component for the
* hook to work correctly.
* Note that the keys of the object (and their order) must remain the same for the lifecycle of the
* component for the hook to work correctly.
*
* @param object Object to memoize.
*
Expand Down

0 comments on commit 2bb9dcd

Please sign in to comment.