guoshencheng / JReact

create react node by json

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jreact Build Status

通过json来渲染生成react node 从而来达到json�渲染页面的效果

example

npm run example

test

npm run test

如何定义一个Json自定义组件

type JRComponent = {
  name?: string, // 组件名称
  reducer?: Reducer<any, any>, // 组件的reducer 控制组件的数据
  Cls: React.ComponentType<any>, // 组件的实现
  actionKeys?: StringMap<DescribableKey>, // 组件的处罚reducer的key
  eventKeys?: StringMap<DescribableKey> // 组件的可触发事件的描述
}

About

create react node by json

License:MIT License


Languages

Language:TypeScript 97.9%Language:JavaScript 2.1%