We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3ce078 commit c07517bCopy full SHA for c07517b
modules/Coroutine.js
@@ -40,13 +40,16 @@ class Coroutine extends Component {
40
};
41
42
if (isPromiseLike(asyncBody)) {
43
+ // asyncFn is Async Function, awaiting for the final result
44
asyncBody.then(updater);
45
} else {
46
const step = this.iterator.next();
47
48
if (isPromiseLike(step)) {
49
+ // asyncFn is Async Generator, rendering every time it yields
50
resolveAsyncIterator(this.iterator, step, updater);
51
52
+ // asyncFn is Sync Generator, rendering the final result, awaiting yielded promises
53
resolveSyncIterator(this.iterator, step, updater);
54
}
55
0 commit comments