项目作者: callmecavs

项目描述 :
Render stateless components and JSX to real DOM.
高级语言: JavaScript
项目地址: git://github.com/callmecavs/understated.git
创建时间: 2017-07-10T13:38:42Z
项目社区:https://github.com/callmecavs/understated

开源协议:

下载


understated

understated on Travis understated on NPM understated Downloads on NPM Standard JavaScript Style

Render stateless components and JSX to real DOM.

Install

  1. $ npm i understated --save

Use

  1. import {
  2. h,
  3. render
  4. } from 'understated'
  5. // tell babel to use h as the JSX pragma
  6. /** @jsx h */
  7. // create a component
  8. const Component = props => (
  9. <p className="content">{ props.text }</p>
  10. )
  11. // render it
  12. render(
  13. <Component text="A stateless component."></Component>,
  14. document.body
  15. )

See Also

License

MIT. © 2017 Michael Cavalea