From 17edbddcfa6c9a51b6c5a7af9c87a996da04f2b0 Mon Sep 17 00:00:00 2001 From: Anton Veselev Date: Sat, 20 Jan 2024 03:08:28 +0000 Subject: [PATCH] remove reset --- src/utils/makeStoreHookPersist.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/utils/makeStoreHookPersist.ts b/src/utils/makeStoreHookPersist.ts index da45526b..639dacc9 100644 --- a/src/utils/makeStoreHookPersist.ts +++ b/src/utils/makeStoreHookPersist.ts @@ -66,15 +66,6 @@ export default (key: string, initialState: S, options?: Options) => { [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 } }