Filter out actions in redux devtool extension

Viewed 4278

I have an action which is dispatched every one second. Its dispatched from a web socket connection which receives data every one second.

This causes my devtool to be filled with a lot of these actions and therefore makes debugging hard for other actions and stuff.

enter image description here

Is there a way to filter out all this "noise" from the logger

I tried doing the following:

const composeEnhancers =
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
    actionsBlacklist: 'METER_DATA_RECEIVE'
  }) || compose;

but this not only filters out the action from the logger but also from the application. i.e, it isn't dispatched so its as good as not calling the action which is what I don't want.

In other words, I want the actions dispatched but not logged in the redux dev tool

3 Answers

You can configure this within the browser.

In the Redux DevTools Extension settings there is an option Filter actions in DevTools. Just enter "METER_DATA_RECEIVE" there.

To modify the extension settings either click the gear icon in the very bottom right corner of the Redux tab or select Extension Options in the Chrome Extension details screen.

I'm filtering out actions within my code using this method its working perfectly - actions are filtererd out but still dispatched.

If you are using other middlewear, perhaps this is messing with it.

middlewares.push(ReduxPromise, reduxThunk);
let composeEnhancers = compose;

const composeEnhancers =
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
    actionsBlacklist: [
         'METER_DATA_RECEIVE',
         'METER_UPLOAD_PARTS',
    ]
  }) || compose;

const store = createStore(reducers, composeEnhancers(applyMiddleware(...middlewares)));
Related