zalmoxisus / remote-redux-devtools

Redux DevTools remotely.
http://zalmoxisus.github.io/monitoring/
MIT License
1.81k stars 139 forks source link

Add optional filters to reduce noise #12

Closed mikepugh closed 8 years ago

mikepugh commented 8 years ago

This PR allows the optional passing of either a whitelist or blacklist array which can be used to reduce the action data logged to devtools.

I've recently started using redux-saga in my React Native app and it dispatches a large number of EFFECT_* actions which I don't necessarily need to see. I imagine there are other 3rd party libs that behave similarly.

Inspiration came from https://github.com/zalmoxisus/redux-devtools-filter-actions

zalmoxisus commented 8 years ago

Thanks a lot for implementing this! I was planning this as it is a good feature to have.

We also need to filter liftedState from here exactly as implemented in redux-devtools-filter-actions, otherwise if you toggle an action you will get all the "noise" back into the monitor as we relay the whole history tree in this case.

Just to know that there are 2 other cases where we relay the whole liftedState (on initialization and on update request for syncing instances), where we need unfiltered history as is so these shouldn't be changed.

mikepugh commented 8 years ago

Ok thanks for the extra info - I'll take a look later this evening and update PR.

mikepugh commented 8 years ago

Updated the PR w/ the filtered liftedState

zalmoxisus commented 8 years ago

It looks good to me. Do you plan to use the new introduced allowStateFilter variable or just forgot to remove it from relay function?

mikepugh commented 8 years ago

:dizzy_face: Oops! Forgot to remove it. It's gone. Thanks

zalmoxisus commented 8 years ago

Thanks a lot for the changes! Just checked, and it works great!