Opposite of reducer functionality
See original GitHub issueHello,
The reducer property is useful for defining all the keys you want to persist. I am looking for a functionality that does the opposite: where I can define a set of keys that I don’t want persisted.
Is it currently possible to achieve this? If so, how?
My suggestion would be an exclude
array with a set of keys, e.g:
... exclude: ['user.password', 'user.email'] ...
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
What is the opposite of reducer? - WordHippo
The word reducer often refers to a pipe component that connects larger diameter pipes to smaller ones. It may also refer to a...
Read more >Opposite of Array.reduce() in javascript - Stack Overflow
Since we're looking for a concise way to generate a given number of elements as an array, this "unfold" function does it with...
Read more >Eccentric reducer - Wikipedia
An eccentric reducer is a fitting used in piping systems between two pipes of different diameters. The same fitting can be used in...
Read more >Another word for REDUCER > Synonyms & Antonyms
noun. a substance capable of bringing about the reduction of another substance as it itself is oxidized; used in photography to lessen the...
Read more >Reducer antonyms - 34 Opposites of Reducer
Antonyms for Reducer · expander · extender · amplifier · enlarger · gainer · increaser · intensifier · raiser.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use the spread operator to achieve this neatly. Assume your state has a property “password” you want to exclude, this works quite nicely for me:
redux-persist has the idea of
whitelisting
andblacklisting
parts of state which I found really useful while I was working with that library. I don’t think it would be out of place to add something like that here.Anyways, here’s what I did to possibly save someone some time: