loading...

Discussion on: Asynchronous with Redux Sagas

Collapse
irmerk profile image
Jolene Langlinais Author

Thank you!

Are you referring to data you are fetching inside a generator function? If so, are you yielding it?

If you're yielding, you can take advantage of the next method. The generator function is acting as an iterator, and you can return the next element in a sequence by invoking next() on the invoked generator (generator().next()). Since this iteration and sort of internal state that the generator maintains, you can stop at any point to see what the state is.

Collapse
chrisachard profile image
Chris Achard

Ah, perhaps using 'next()' was part of the puzzle I was missing. Thanks! I'm going to go and check that out.

Thread Thread
irmerk profile image
Jolene Langlinais Author

Great! Yes, and here's a resource I found helpful on the subject by Rajesh Babu.