Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter out actions in redux devtool extension

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

like image 372
Krimson Avatar asked Jan 08 '19 21:01

Krimson


People also ask

What is __ Redux_devtools_extension_compose __?

__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ stopping vscode chrome debugger from loading with TypeError zalmoxisus/redux-devtools-extension#690.

How do I disable Redux DevTools in production?

If you don't want to allow the extension in production, just use 'redux-devtools-extension/developmentOnly' instead of 'redux-devtools-extension'.

How do I enable trace in Redux DevTools?

By default it's disabled as, depending of the use case, generating and serializing stack traces for every action can impact the performance. To enable it, set trace option to true as in examples.


1 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.

like image 57
romor Avatar answered Oct 02 '22 09:10

romor