0

Hello I would like not display one of my actions in extension Redux DevTools. I thought I could do it with property actionBlocklist but when I wrote this:

 StoreDevtoolsModule.instrument({
      maxAge: 25,
      logOnly: environment.production,
      actionsBlocklist: ['[ACTION] NAME_OF_ACTION'] }),

nothing is change. I'm sure that name of action is same as name from redux. Maybe I misunderstanding concept of this property.

Tony Ngo
  • 19,166
  • 4
  • 38
  • 60
Lukasz
  • 63
  • 8

1 Answers1

2

This is because it's using a regex check under the hood. Because the action name contains of [ and ], the check will fail and won't block the action.

Unfortunately the typings don't allow a regex to be passes, but as a workaround you can do:

actionsBlocklist: [/\[ACTION\] NAME_OF_ACTION/.source] 
timdeschryver
  • 14,415
  • 1
  • 19
  • 32