Skip to content

Commit f59141c

Browse files
committed
make rules of hooks happy
(even though it’s not needed)
1 parent 663a2cf commit f59141c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/usePersistedState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const usePersistedState = (initialState, key, { get, set }) => {
2525
return () => {
2626
globalState.current.deregister();
2727
};
28-
}, []);
28+
}, [initialState, key]);
2929

3030
const persistentSetState = useCallback(
3131
(newState) => {

0 commit comments

Comments
 (0)