Skip to content

Commit

Permalink
remove reset
Browse files Browse the repository at this point in the history
  • Loading branch information
inker committed Jan 20, 2024
1 parent bb3e2a5 commit 17edbdd
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/utils/makeStoreHookPersist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ export default <S>(key: string, initialState: S, options?: Options<S>) => {
[setStoredValue, storedValue],
)

const reset = useCallback(() => {
setStoredValue(initialState)
try {
window.localStorage.removeItem(key)
} catch (err) {
console.error(err)
}
}, [setStoredValue])

return [storedValue, setValue, reset] as const
return [storedValue, setValue] as const
}
}

0 comments on commit 17edbdd

Please sign in to comment.