Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function for filtering #47

Closed
Pajn opened this issue Dec 31, 2015 · 6 comments
Closed

Function for filtering #47

Pajn opened this issue Dec 31, 2015 · 6 comments

Comments

@Pajn
Copy link

Pajn commented Dec 31, 2015

Currently one can specify a white or blacklist of actions which should be persisted. I would like to specify a function instead which is passed the action and determine whether a rehydrate should be performed or not. If you agree I can submit a PR.

@rt2zz
Copy link
Owner

rt2zz commented Jan 5, 2016

I need to think about this. Initially the concept behind redux-persist was to simplify the persistence model by allowing reducer scoped blacklist/whitelist. That said I do not want to be overly prescriptive and I can definitely envision scenarios where more selective filtering is needed.

@rt2zz
Copy link
Owner

rt2zz commented Feb 10, 2016

@Pajn I think this makes sense. what do you think about using the same api as redux-logger and having a predicate option?

@drop-dan
Copy link

+1

@Pajn
Copy link
Author

Pajn commented Feb 12, 2016

Sounds great.
If you want a PR I should have some time next week but otherwise just go on and implement it :)

@rt2zz
Copy link
Owner

rt2zz commented Apr 4, 2016

regarding filtering actions it looks like we would need to add some extra wrapper around the subscribe since by default subscribe is action unaware.

If you do decide to work on this, it is best to develop against v3 branch as that is where the latest code is.

@rt2zz
Copy link
Owner

rt2zz commented Sep 18, 2016

closing due to inactivity, feel free to PR!

Also note: because this would require non-trivial extension to subscribe to be action aware, I am wary to add this to the core redux-persist lib, perhaps there is a clever way to implement this as a dependent module.

@rt2zz rt2zz closed this as completed Sep 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants