Why cause so yield in koa?

Decided to explore koa. Reviewed documentation, decided to see the examples. Found it here. I can not understand, why write:
this.body = yield render('list', { posts: posts });


As I understand it, calling yield, we simply call the following app.use(). Ie is middleware. And the idea is nothing to return to should not.
July 2nd 19 at 17:25
2 answers
July 2nd 19 at 17:27
Solution
The question read https://learn.javascript.ru/generator
Well, actually, it's obsolete, use koa 2, there is a more clear async
And it is more than clear? - sally_Carro commented on July 2nd 19 at 17:30
: the fact that it is intuitive and is designed just for such things - timmothy.Tromp43 commented on July 2nd 19 at 17:33
: no offense, the stupidest thing I never read - sally_Carro commented on July 2nd 19 at 17:36
that was the "no offense" usually the answer argue - timmothy.Tromp43 commented on July 2nd 19 at 17:39
:: try me arguments to explain what async name () { return await, promise} intuitive function * name () { return yield promise } - sally_Carro commented on July 2nd 19 at 17:42
July 2nd 19 at 17:29
Solution
You do not understand, learn about generators and their use in with, which is impregnated with Koa....

Find more questions by tags Node.js