Skip to content

Commit

Permalink
fix: useLocalStorage dependency array
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Feb 12, 2021
1 parent 627560f commit abd7f86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/devtools/useLocalStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function useLocalStorage(key, defaultValue) {
} else {
setValue(initialValue)
}
}, [])
}, [defaultValue, key])

const setter = React.useCallback(
updater => {
Expand Down

1 comment on commit abd7f86

@vercel
Copy link

@vercel vercel bot commented on abd7f86 Feb 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.