Skip to content

Commit

Permalink
resolved defaultValue not set in session storage
Browse files Browse the repository at this point in the history
  • Loading branch information
msv96 committed Jan 27, 2024
1 parent 8e738b3 commit 68f6a6a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function createStorage<T>(type: StorageType, hookName: string) {

useEffect(() => {
if (getInitialValueInEffect) {
setValue(readStorageValue());
setStorageValue(readStorageValue());
}
}, []);

Expand Down

0 comments on commit 68f6a6a

Please sign in to comment.