Do you want to request a _feature_ or report a _bug_?
What is the current behavior?
When dispatching from the redux devtools in chrome, the action is triggered but the Epic is not.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsbin.com or similar.
Having redux devtools installed you can dispatch {type: 'PING'} and the UI updates, however, the Epic to trigger 'PONG' is not invoked.
https://output.jsbin.com/vuviliveka/1
What is the expected behavior?
When sending dispatches from devtools Epics are able to react to them.
Which versions of redux-observable, and which browser and OS are affected by this issue? Did this work in previous versions of redux-observable?
OS: OS X
latest version of everything
Not sure if this worked before, just now diving into all this.
While I don't quite understand the true reason, this is not specific to redux-observable apparently.
Here's the original report on the dev tools: https://github.com/zalmoxisus/redux-devtools-extension/issues/133
You need to add window.devToolsExtension.updateStore(store).
https://output.jsbin.com/nuquba
const epicMiddleware = createEpicMiddleware(pingEpic);
const store = createStore(pingReducer,
compose(
applyMiddleware(epicMiddleware),
window.devToolsExtension ? window.devToolsExtension() : f => f
)
);
if (window.devToolsExtension) {
window.devToolsExtension.updateStore(store);
}
I will definitely add this to the documentation.
The store object from inside devToolsExtension is different from that returned from epicMiddleware.
This is documented in Troubleshooting. Should be fixed after https://github.com/reactjs/redux/pull/1702 gets merged.
Thanks for the responses. I'm a total noob in the Redux world so greatly appreciate the detailed feedback.
@subhaze you're welcome! I've added a section on this to the docs.
Most helpful comment
The
storeobject from insidedevToolsExtensionis different from that returned fromepicMiddleware.This is documented in
Troubleshooting. Should be fixed after https://github.com/reactjs/redux/pull/1702 gets merged.