Skip to content

Commit

Permalink
Add remarks about timeout option in FAQ section of /local and /sess…
Browse files Browse the repository at this point in the history
…ion adapters
yumauri committed Nov 18, 2023
1 parent f6a2d68 commit 8d5d732
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/local/README.md
Original file line number Diff line number Diff line change
@@ -84,6 +84,8 @@ persist({

### Can I debounce updates, `localStorage` is too slow?

Since version **6.0.0** there is a `timeout` option, which will throttle writes to `localStorage`, so you can specify it. Or you can use older approach, which is described below.

Since version **4.3.0**, you can use `clock` option and `debounce` from [patronum](https://github.com/effector/patronum/tree/main/debounce), to reach that goal:

```javascript
2 changes: 2 additions & 0 deletions src/session/README.md
Original file line number Diff line number Diff line change
@@ -80,6 +80,8 @@ persist({

### Can I debounce updates, `sessionStorage` is too slow?

Since version **6.0.0** there is a `timeout` option, which will throttle writes to `sessionStorage`, so you can specify it. Or you can use older approach, which is described below.

Since version **4.3.0**, you can use `clock` option and `debounce` from [patronum](https://github.com/effector/patronum/tree/main/debounce), to reach that goal:

```javascript

0 comments on commit 8d5d732

Please sign in to comment.