Closed exilonX closed 5 years ago
Try moving the takeUntil
into the flatMap
just after the getStreamData().map()
. This will cancel the inner observable rather than the outer observable when the action is received.
Yeah now it sounds quite obvious! Thanks a lot!
I am using flutter with redux and for handling stream data I'm using redux-epics.
Like this:
In my screen in onInit I call
store.dispatch(RequestDataAction())
and onDispose I callstore.dispatch(CancelGetDataAction())
which destroys the Observable altogether, so the next time I go to this screen if I callstore.dispatch(RequestDataAction())
my stream is not sending data, actually the entire Observable is dead!How can I solve this problem? As far as I can see the problem is takeUntil because I completely closes the observable..