queckezz/koa-views

Why do I have to call 'return' on ctx.render

rkt2spc opened this issue · 1 comments

Why does this works:

app.use((ctx, next) => {
  return ctx.render('user', { user }); // return is important, I don't know why
});

and this doesn't:

app.use((ctx, next) => {
  ctx.render('user', { user }); // Response 404
});