Closed kairyu closed 4 years ago
Hey!
Sure, it's out now in 1.0.2
. You can use logic.cache.localStorageDefaults['reducerKey']
to get the original default for reducerKey
I'm sorry for not getting back to this issue sooner. You are amazing! I really appreciate for you prompt improvement!
No problem :).
One more thing though, you might be interested in the new babel-plugin-kea, which automatically adds path
s to logic that doesn't have any manually defined. It might save some typing.
Oh that's good to know. Really cool stuff! Let me try it.
Thank you for the great plugin again!
Recently I have a use case which needs to access the original
logic.defaults
whilekea-localstorage
plugin is enabled.From my understanding,
kea-localstorage
will override the originaldefaults
with the values in localStorage when the values has option{ permit: true }
. Is there any way to access the originaldefaults
in this case?If there is no existing way to access it, could you please consider to add a new feature such as changing the mechanism to avoid overriding the
defaults
or copying the originaldefaults
to another property e.g.originalDetaults
before this plugin override them?Thank you in advance.