Skip to content

Commit

Permalink
✏️ add storeDefault option to docs #1
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Aug 7, 2024
1 parent b145e6c commit e06e7e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ Default: `true`

Setting to `false` doesn't subscribe to the [Window storage event](https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event). If you set to `false`, updates won't be synchronized across tabs, windows and iframes.

#### `options.storeDefault`

Type: `boolean`

Default: `false`

Setting to `true` calls `storage.setItem()` for the default value so the default value is persisted in `Storage` after the first render of the hook.

#### `options.serializer`

Type: `{ stringify, parse }`
Expand Down

0 comments on commit e06e7e9

Please sign in to comment.