Skip to content

Commit

Permalink
docs(local-storage): update doc to clarify useLocalStorage type restr…
Browse files Browse the repository at this point in the history
…iction (#92)

Add a tip to hint that value could be an array, plain-object or other types. The feature is not pretty frank in demo.
  • Loading branch information
599316527 authored Jun 11, 2021
1 parent e4b972a commit 81b5f13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/local-storage/docs/useLocalStorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ order: 2

# useLocalStorage

Retrieve value from `localStorage` by key, also returns a function to update it.
Retrieve value from `localStorage` by key, also returns a function to update it. Value could be any type which can be handled by `JSON.stringify`.

```typescript
function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T) => void]
Expand Down

0 comments on commit 81b5f13

Please sign in to comment.