question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replayed actions not passed through middleware when using redux-devtools-extension

See original GitHub issue

Hello, I’m trying to adopt use of redux-devtools-extension in my project but I’ve encountered the error from title . Would appreciate some help with the issue if possible.

I’m using Redux DevTools extension 2.11.1

along with:

redux@3.3.0
ng-redux@3.3.3

When I dispatch actions through store.liftedStore.dispatch they aren’t going through my redux middlewares stack(defined in my application as middlewares). Obviously when I run actions through store.dispatch everything works correctly.

The same applies when using slider in redux-devtools-extension - my middleware chain doesn’t receive replayed actions.

I couldn’t find solution on https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/Troubleshooting.md

redux-devtools-extension is the only enhancer that I’m using, but maybe ngRedux applies it wrong? I’m initializing store this way:

$ngReduxProvider.createStoreWith(
  rootReducer, 
  middlewares,
  [window.__REDUX_DEVTOOLS_EXTENSION__()])

You can see how final store is composed under this link: https://github.com/angular-redux/ng-redux/blob/3.3.0/src/components/ngRedux.js#L16

Maybe it has something to do with https://github.com/reactjs/redux/issues/1051 ? I’m trying to figure it out on my own but would appreciate some help.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zalmoxisuscommented, Dec 21, 2016

@Machiaweliczny, what if we’d pass the action to your function whenever a monitor action is invoked:

$ngReduxProvider.createStoreWith(
  rootReducer, 
  middlewares,
  [window.__REDUX_DEVTOOLS_EXTENSION__({
    onMonitorAction: action => { if (action.type === 'CHANGE_LOCATION') changeLocation(action.location); }
  })])
1reaction
zalmoxisuscommented, Dec 15, 2016

Redux DevTools intentionally doesn’t redispatch actions to avoid side effects. So, except that middleware, the router needs something like this. Honestly, I don’t like such workarounds, so any suggestions of what we could do from our side, would be welcome.

What you wanted to do is possible by connecting the router to the extension as a separate instance, but that’s not an easy solution either, as you’ll have to reimplement the monitor actions, and not sure that having it decoupled from your main store is the case.

It seems that there’s an open issue there https://github.com/neilff/redux-ui-router/issues/49.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redux Dev Tools not working for large action payload
I'm working on a react/redux application and am having a problem using the time travel feature in redux dev tools chrome extension.
Read more >
Improve your development workflow with Redux DevTools ...
When I save a file, DevTools replays my “scenario” and shows computed states. I can switch between steps. I know that no stray...
Read more >
Redux DevTools: Tips and tricks for faster debugging
We will look into some extraordinary features that Redux DevTool offers that can help you debug your applications faster.
Read more >
How to use the redux-devtools.persistState function in ... - Snyk
To help you get started, we've selected a few redux-devtools. ... enhancer ) // Required for replaying actions from devtools to work reduxRouterMiddleware....
Read more >
Configuring Your Store - Redux
In this code, we pass our reducers to the Redux createStore function ... The redux-thunk middleware, which allows simple asynchronous use of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found