diff --git a/src/index.tsx b/src/index.tsx index 52f4047..86f2dec 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -64,6 +64,8 @@ const useFormPersist = ( if (onDataRestored) { onDataRestored(dataRestored) } + + return () => getStorage().setItem(name, JSON.stringify(dataRestored)); } }, [ storage,