I have external API that has a method like this
watchForEvents(callback), where callback should be a function function(result, error) {...}.
Callback invoked many times - one time for the each event produced by the API. Method watchForEvents is non-blocking.
I have a React.JS app that uses redux-saga. I can not figure out how to deal with such API.
If I invoke API method and make delay in my saga - everything works. I.e. yield call(delay, 10000);. But without delay saga swallows all invocations of the callback.
What can I do with this?