zalmoxisus/redux-devtools-extension

Extension Ignores Redux-Saga

Closed this issue · 7 comments

I might be missing something, but it seems like this extension is completely oblivious to Redux-Saga.

https://gist.github.com/Sinistralis/2b181bae168a556b268fd69c32b5f556

It ignores all actions dispatched by Sagas, and if you dispatch an action through the dispatch window in the extension, your Sagas never receive it.

Starting from v0.10.0, there's a sagaMiddleware.run(saga, ...args) which starts sagas.

I added a workaround by updating the store after it is created.
It should work better with new Redux 4 API.

Please build the extension to check it.

This makes a lot of sense. I am running my sagas but was not aware there was context I needed to update in the extension. I'll try this today and get back to you.

Should work in v2.0.1. Feel free to reopen the issue if it doesn't work.

Nah this worked perfectly. Thanks!

@zalmoxisus This also affected redux-observable redux-observable/redux-observable#81 so I'm trying to understand why. It doesn't modify the store in any way other than the intrinsic way that redux composes middleware to create the store you receive, so this seems like something that shouldn't be a problem since this is normal middleware behavior.

Is there any way we can mitigate this so that it "just works" without the need to updateStore()? Admittedly, I don't exactly understand how the devtools hooks into the store so I'm missing a large chunk of context, just coming from a DevEx perspective.

Should be fixed after reduxjs/redux#1702 gets merged. -@zalmoxisus redux-observable/redux-observable#81 (comment)

Nevermind 😄

The extension API was changed. No need for window.devToolsExtension.updateStore workaround anymore (it will be deprecated in the next version). Just use window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ or import redux-devtools-extension npm package.