docs
This commit is contained in:
parent
74c452a93f
commit
6eb92c3bd1
1 changed files with 5 additions and 5 deletions
|
@ -54,11 +54,11 @@ app.use(function(next){
|
|||
13. Hand off to Koa to handle the response
|
||||
|
||||
|
||||
Note that the final middleware (step __6__) yields to what looks to be nothing - it's actually
|
||||
yielding to a no-op generator within Koa. This is so that every middleware can conform with the
|
||||
same API, and may be placed before or after others. If you removed `yield next;` from the furthest
|
||||
"downstream" middleware everything would function appropritaely, however it would no longer conform
|
||||
to this behaviour.
|
||||
Note that the final middleware (step __6__) yields to what looks to be nothing - it's actually
|
||||
yielding to a no-op generator within Koa. This is so that every middleware can conform with the
|
||||
same API, and may be placed before or after others. If you removed `yield next;` from the furthest
|
||||
"downstream" middleware everything would function appropritaely, however it would no longer conform
|
||||
to this behaviour.
|
||||
|
||||
For example this would be fine:
|
||||
|
||||
|
|
Loading…
Reference in a new issue