Blacklisted actions still contribute to the actions history
See original GitHub issueI would like to hide some type of actions in Redux DevTools history. In the documentation I’ve found an information about actionsBlacklist
option, which I am passing to
window.__REDUX_DEVTOOLS_EXTENSION__(...)
This has some effect, i.e. I no longer see the blacklisted actions, but behind the scenes they still contribute to the history length, so instead of seeing the history of default length (50) I can only see a couple of most recent actions that has not yet been pushed back but the blacklisted ones.
Looks like increasing the history length, which as far as I understand is controlled by the maxAge
option, helps a bit but it feels like a workaround rather than a real solution.
I am wondering if there’s a better way to fix this behavior which I described above and if it’s even intended or just a BUG?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:8 (3 by maintainers)
Top GitHub Comments
It’s implemented in
2.16
, which will land in a day on Chrome Store. It works only for balcklisted/whitelisted actions. Forpredicate
it would require a major refactoring as the state is computed after maxAge is called.I introduced the concept of dynamic
maxAge
in https://github.com/zalmoxisus/redux-devtools-instrument/pull/22, so on the extension part we can readjust it every time a current action was blacklisted. Should have this in next version, no changes needed from client side. However, it will be also possible to readjust it by passing a function formaxAge
, which will get current action as argument (so you can change depending on the type or payload). But for most of cases it will work out of box providing a number, which will be automatically changed depending on whitelisted actions.