Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgv committed Feb 8, 2024
1 parent ff488b2 commit 12fa69d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const useStorage = <T = any>(rawKey: RawKey, onInit?: Setter<T>) => {
const key = isObjectKey ? rawKey.key : rawKey

// Render state
const [renderValue, setRenderValue] = useState<T>(onInit)
const [renderValue, setRenderValue] = useState(onInit)

// Use to ensure we don't set render state after unmounted
const isMounted = useRef(false)
Expand Down

0 comments on commit 12fa69d

Please sign in to comment.