Closed JalilArfaoui closed 5 years ago
Or do you think this is a pure redux-observable
typing issue ?
Hey @JalilArfaoui, Thank you for your trust and contribution. I don't see any error on codesandbox!
As I said, the error pops in create-store.ts on epicMiddleware.run(rootEpic)
:
Oh, all of my error finding nuclei in my brain was searching around combineEpic
.
It's related to https://github.com/redux-observable/redux-observable/issues/592.
The error is due to the default void
type for the state generic in EpicMiddleware
interface in redux-observable
(maybe it was intentional!). I have provided a codesandbox with simple epic to explain it.
Any workaround here?
It's related to redux-observable @creaux. You can follow it on https://github.com/redux-observable/redux-observable/issues/592.
First, thanks for this very neat library !
Here's a weird error when used with redux-observable ... if trying to
combineEpics
only one epic !I know
combineEpics
is useless with only one epic ... but if you have 2 epics, and you want to momentary disable one, it shouldn't be a problem IHMO.I've reproduced the issue based one the example given in the docs : https://deox.js.org/faq#using-redux-observable-with-deox
Here's my CodeSandbox "fork" : https://codesandbox.io/s/redux-observable-example-4g1lt
The only thing I changed from the given one (https://codesandbox.io/s/redux-observable-example-z6sdk) is to replace
combineEpics(fetchAllTodosEpic, addTodoEpic)
bycombineEpics(addTodoEpic)
in todos.ts.The error then pops all the way in create-store.ts on
epicMiddleware.run(rootEpic)
:Any insight on this ?