elgerlambert / redux-localstorage

Store enhancer that syncs (a subset) of your Redux store state to localstorage.
MIT License
1.32k stars 107 forks source link

Add a configuration example for Immutable.js #56

Open NameFILIP opened 7 years ago

NameFILIP commented 7 years ago

For https://github.com/elgerlambert/redux-localstorage/issues/49

TeemuKoivisto commented 7 years ago

Cool stuff and I wondered why there was no immutable example on this repo (probably because it's unmaintained?). The PR #57 is way too convoluted for my liking and this one is all good except I had to change this:

merge: (initialState, persistedState) => initialState.mergeDeep(persistedState),

To this:

merge: (initialState, persistedState) => new Map(initialState).mergeDeep(persistedState)

For it to work.

Perhaps the maintainers of this repo will merge this someday although I am not too hopeful.