ngneat/elf

preStorageInit alternative to Akita state management

micobarac opened this issue · 1 comments

Akita state management library has PersistState with:

preStorageUpdate(storeName: string, state: any): any;
preStoreUpdate(storeName: string, state: any, initialState: any): any;

Elf state persistState management, on the other hand, only has:

preStoreInit?: (value: StoreValue<S>) => Partial<StoreValue<S>>;

Storage init callback method is missing.

I am trying to persist two-way encoded sensitive data in local storage using persistState.

You're welcome to submit a PR :)