Skip to content

Commit

Permalink
[@mantine/hooks] use-session-storage: Fix default value not being set…
Browse files Browse the repository at this point in the history
… in the storage on initial render (#5663)
  • Loading branch information
msv96 authored Feb 1, 2024
1 parent afbfc1a commit 8b3bf17
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 8b3bf17

Please sign in to comment.