Skip to content

Commit e10c8b8

Browse files
authored
Merge pull request #100 from philipp985/patch-1
Return values as const to make the compiler happy in typescript
2 parents 74b5fbe + c24edda commit e10c8b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/useLocalStorage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ function useLocalStorage<T>(key: string, initialValue: T) {
127127
}
128128
};
129129

130-
return [storedValue, setValue];
130+
return [storedValue, setValue] as const;
131131
}
132132
```

0 commit comments

Comments
 (0)