Closed quarrant closed 3 years ago
@codeBelt FYI
@quarrant is this a todo list for a v1.0.0 release?
@codeBelt yep
@quarrant can you write more information on what these are:
@codeBelt
true
non observable properties doesn't save to storage (memory economy) @quarrant Here is what I have so far. I had a little help from a friend on naming.
makeAutoPersistable
(todo by @quarrant)makePersistable
With Required Options:
import { makePersistable } from 'mobx-persist-store';
makePersistable(this, { name: 'myStore', properties: ['someProperty'], storage: window.localStorage });
With All Options:
import { configure } from 'mobx-persist-store';
import localForage from "localforage";
import ms from 'milliseconds';
makePersistable(
this,
{
name: 'myStore',
properties: ['someProperty'],
storage: localForage,
expireIn: ms.days(7),
removeOnExpiration: false,
stringify: false,
},
{ delay: 200 }, // Optional
);
clearPersistedStore
hydrateStore
isHydrated
isPersisting
pausePersisting
startPersisting
stopPersisting
import { configure } from 'mobx-persist-store';
import localForage from "localforage";
import ms from 'milliseconds';
configure({
storage: localForage, // localForage, window.localStorage, AsyncStorage all have the same interface
expireIn: ms.days(7),
removeOnExpiration: false,
stringify: false,
delay: 200,
});
...
// Only `name` and `properties` are needed for `makePersistable`
makePersistable(this, { name: 'myStore', properties: ['someProperty'] });
I would like to write tests for PersistStore.ts
still before I hand it off to you. I hope to get that done next weekend.
@codeBelt can we talk in telegram?
@quarrant I sent you a LinkedIn request. Lets talk there
@quarrant I think I am finished with all my code changes and update the README. https://github.com/codeBelt/mobx-persist-store/tree/MobxStorePersist#readme
The only thing I will need to do is update the example demo.
@quarrant Do want to merge my code and get a Release Candidate 1.0.0-rc.0
tag out there? Then I can start woking on the example demo and have people start playing with it.
@quarrant Do want to merge my code and get a Release Candidate
1.0.0-rc.0
tag out there? Then I can start woking on the example demo and have people start playing with it.
done
@quarrant what do you think of new code: https://codesandbox.io/s/mobx-persist-store-version-1-f852w?file=/src/stores/User.store.ts&theme=dark
Do you have anyone else to give us feedback on the new changes?
@quarrant Have you tried out 1.0.0-rc.0
? Is it ready to be released as 1.0
?
@codeBelt yep! It's a great work! let's go =)
@quarrant I think you can close those 4 current issues since we have a 1.0
release.
Supports only mobx v6
API
New