Closed MatiasArriola closed 3 years ago
Hey @MatiasArriola. Thanks for the PR and sorry for answering so late, but I've been quite busy lately. At first glance seems a reasonable proposal. I'll have a look and get this merged and released today :)
Totals | |
---|---|
Change from base Build 1087060535: | 0.0% |
Covered Lines: | 64 |
Relevant Lines: | 64 |
@MatiasArriola, I made the extra key parameter in the serialize
and unserialize
functions required, this way we can guarantee that your serialize/unserialize function always has a proper key to check against.
The latest version 3.0.1 is now released on npm, this version includes the extra key parameter you needed.
Hello,
First of all, thanks for writing this library!
I came here looking for a redux-persist replacement after hitting some critical unresolved issues in my react-native apps. I'm relieved the move to redux-remember was relatively easy.
The only thing I was missing is some way to omit certain keys per reducer. I figured out I could do that by passing a custom
serialize
. But there was no way I could tell which slice I'm serializing from inside the serializer, hence this patch.Here some code that illustrates this use-case:
Just wanted to contribute back the changes I needed for my projects, hope you find it valuable.
Cheers!