Skip to content

Extension Ignores Redux-Saga #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Mike-Sinistralis opened this issue Jun 8, 2016 · 7 comments
Closed

Extension Ignores Redux-Saga #133

Mike-Sinistralis opened this issue Jun 8, 2016 · 7 comments

Comments

@Mike-Sinistralis
Copy link

Mike-Sinistralis commented Jun 8, 2016

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.

zalmoxisus added a commit that referenced this issue Jun 10, 2016
zalmoxisus added a commit that referenced this issue Jun 10, 2016
@zalmoxisus
Copy link
Owner

zalmoxisus commented Jun 10, 2016

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.

@Mike-Sinistralis
Copy link
Author

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.

@zalmoxisus
Copy link
Owner

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

@Mike-Sinistralis
Copy link
Author

Nah this worked perfectly. Thanks!

@jayphelps
Copy link

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

@jayphelps
Copy link

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

Nevermind 😄

@zalmoxisus
Copy link
Owner

zalmoxisus commented Oct 6, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants