koa-react-engine

0.0.1 • Public • Published

koa-react-engine

koa-react-engine api

 config = util._extend({
    docType: "<!DOCTYPE html>",
    viewPath: '',
    routerPath: '',//确定是基于router的 还是直接view
      jsx:{},
    cache: false,
    writeResp: true,
    ext: 'jsx'
  },config||{});
  

use it

var render = require('koa-react-engine');
var app = koa();

render(app,renderOption);  or app.use(render(renderOption));
  

使用案例 react-midway-example

####bug 反馈 zhoujianlin8@gmail.com

Package Sidebar

Install

npm i koa-react-engine

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • zhoujianlin