From 795b92cc1a168c48c7710ca6e0e1ef5974013d95 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 26 Oct 2023 19:07:31 +0200 Subject: refactor(hooks): rewrite useLocalStorage hook * return a tuple instead of an object * add a validator function as parameter (if the stored value is manually changed, it is not safe to cast its type) * add tests --- src/utils/hooks/use-local-storage/index.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/utils/hooks/use-local-storage/index.ts (limited to 'src/utils/hooks/use-local-storage/index.ts') diff --git a/src/utils/hooks/use-local-storage/index.ts b/src/utils/hooks/use-local-storage/index.ts new file mode 100644 index 0000000..87c1953 --- /dev/null +++ b/src/utils/hooks/use-local-storage/index.ts @@ -0,0 +1 @@ +export * from './use-local-storage'; -- cgit v1.2.3