title: Why ctx.state did not pass to another middleware?
body: <p>use <code>koa2</code> <code>ejs</code> <code>koa-router</code>, <code>ejs template</code> how to use another middleware's <code>ctx.state</code></p>
  
  <p>localhost:3000/admin/usermsg</p>
  
  <pre><code>admin.get('/usermsg', async(ctx) =&gt; {    
  
  ctx.state.userMsg = {
      page: Number(ctx.query.page),      
      limit: 4,                            
      pages: 0,                            
      count: count                        
  }
  
  var userMsg = ctx.state.userMsg;
  
  ctx.state.users = await new Promise(function(resolve, reject){
      userMsg.pages = Math.ceil(userMsg.count / userMsg.limit);
      userMsg.page = userMsg.page &gt; userMsg.pages ? userMsg.pages : userMsg.page;        
      userMsg.page = userMsg.page &lt; 1 ? 1 : userMsg.page;
  
      var skip = (userMsg.page - 1) * userMsg.limit;                 
  
      User.find().limit(userMsg.limit).skip(skip).exec(function(err, doc){
          if(doc){
              resolve(doc);
          }
  
          if(err){
              reject(err);
          }
      })
  })
  
  await ctx.render('admin/usermsg');
  })
  </code></pre>
  
  <p>localhost:3000/damin/category</p>
  
  <pre><code>admin.get('/category', async(ctx) =&gt; {
  await ctx.render('admin/category');
  })
  </code></pre>
  
  <p>in the <code>category template</code>，can not get <code>ctx.state.userMsg</code>.</p>
  
  <p>how should i get <code>ctx.state.userMsg</code> in <code>category template</code>?</p>