Skip to content

Commit

Permalink
fix: use latest set object in useSet "has" method
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Nov 28, 2019
1 parent a72386e commit 41f9452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const useSet = <K>(initialSet = new Set<K>()): [Set<K>, Actions<K>] => {
remove: item => setSet(prevSet => new Set(Array.from(prevSet).filter(i => i !== item))),
reset: () => setSet(initialSet),
}),
[setSet]
[set, setSet]
);

return [set, utils];
Expand Down

0 comments on commit 41f9452

Please sign in to comment.