title: What's the best way to pass values among middlewares in koa.js
body: <p>I have a simple setup for koa.js with koa-route and koa-ejs.</p>
  
  <pre><code>var koa     = require('koa');
  var route   = require('koa-route');
  var add_ejs = require('koa-ejs');
  var app     = koa();
  
  add_ejs(app, {…});
  
  app.use(function *(next){
      console.log( 'to do layout tweak for all requests' );
      yield next;
  });
  
  app.use(route.get('/', function *(name) {
    console.log( 'root action' );
    yield this.render('index', {name: 'Hello' });
  }));
  </code></pre>
  
  <p>What's the best way to pass values between those two methods?</p>