Victor
Victor
To think about API like this: ```js persist({ store: { page: $page, count: $count } }) ``` in that case it is theoretically possible to batch updates of two stores
```js const pagination = restore({ page: 1, count: 10, }) persist({ store: pagination }) pagination.page.on(changePage, …) pagination.count.on(changeCount, …) const $pagination = combine(pagination) ```
There are other dependencies, used prior to building, this issue is related to them, actually, not just to `effector`: ``` "devDependencies": { "@size-limit/preset-small-lib": "^4.5.4", "@types/jest": "^26.0.4", "@types/node": "^14.0.23", "dual-publish": "^0.11.0",...
Also, with throttling there may be situation, when latest value wasn't saved. Need to add ```javascript window.addEventListener('beforeunload', ...) ``` handler For reference: https://gist.github.com/kobzarvs/f8d4795dd6358e7767adb1a2d9387d64
Some sort of throttle/debounce possible to do with `clock` option (see #15). It is not enough to close this issue, but for someone, looking for solution, `clock` might be useful.
I've checked this module, as far as I understand, there are 3 different versions in the wild, 3x, 4x and 5x, they all have different API (3 and 4 a...
Hm. Can you describe case example with potential race condition? There is no any special mutex in this library, it just standard [`storage` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event) listener. So, I guess, in case...
Hmm... This is very interesting, actually :) I bet same results you will get when working with plain JS values, stored in `localStorage`, using sync with `"storage"` event. Without `effector`...
I just recently have known about [Web Locks API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API), maybe it could be used to avoid race conditions, need to investigate
Generally, I have two concerns: ### 1. API How this should looks like? - **Clear whole storage** ¯\\\_(ツ)\_/¯ Separate function, maybe? Or event? ```javascript import { clear } from 'effector-storage/local'...