mst-persist icon indicating copy to clipboard operation
mst-persist copied to clipboard

Persist and hydrate MobX-state-tree stores (in < 100 LoC)

Results 11 mst-persist issues
Sort by recently updated
recently updated
newest added

When i add blacklist or white list, the data cannot save in local storage. ```ts persist('@user', UserModel, { storage: AsyncStorage, jsonify: true, blacklist: ['state'] // IT will not save data...

Go multiple levels deep with whitelists and blacklists. Right now you can only go one level deep, which misses a good number of use cases. So instead of just `manga`,...

kind: feature

**Main Question** what do you think about clear storage, when its structure was upgraded (extended, updated, ...)? **Example** 1. development iteration 1: create basic model ```ts const User = types...

Why if I add `mst-persist` all keys are kept except `finishArr` which becomes an empty string? Isn't it possible to store arrays in it? ```javascript const Dice = types .model('Dice',...

- object with `toStorage` and `fromStorage` functions - `toStorage` is called after removing whitelist and blacklists and before serializing to JSON - `fromStorage` is called after deserializing from JSON -...

progress: external blocker
kind: feature

Per my comments in https://github.com/agilgur5/mst-persist/issues/1#issuecomment-508253724, should support something like [`redux-persist`'s State Reconcilers](https://github.com/rt2zz/redux-persist#state-reconciler) as merge strategies. This is basically just to handle state created in `.create(...)`, unless `persist` is called after...

solution: workaround available
kind: feature

it is possible to add an expire time for local storage?

solution: workaround available
kind: feature
scope: integration

Hi. ## Environment info React native info output: ```bash System: OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver) CPU: (8) x64 Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz Memory: 12.78 GB...

solution: intended behavior
solution: duplicate
kind: support
solution: needs test

The only reason it isn't is because there's a decent bit of work and decisions to ensure it conforms with `localStorage` and `localForage` (and similar type interfaces). See discussion in...

scope: types

This is part feature, as it introduces new functionality, and part bug, as really it should have always returned a disposer to begin with. Without a disposer there is, well,...

kind: feature