Package detail

koa-jsx

yiminghe57MIT2.0.7

koa middleware for transforming jsx of react

react, jsx, koa

readme

koa-jsx

koa middleware for transforming jsx of react

usage

var koa = require('koa');
var jsx= require('koa-jsx');
app.use(jsx(__dirname,{
  reactTools: require('react-tools')
}));

api

jsx

middleware for koa

GeneratorFunction jsx(dir:String, option: Object)
name type description
dir String load js file at path (dir + url), if this file's first line contains /* @jsx React.DOM /, then transform its content into normal javascript and output to browser.
option Object option config
option.reactTools Object require('react-tools') module exports