zzeact
Zzeact is a JavaScript library to learn the source code of React.
Last updated 7 months ago by zong .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install zzeact 
SYNC missed versions from official npm registry.

Zzeact

Zzeact is a JavaScript library to learn the source code of React.

Todo

  • [x] DOM render
  • [x] Event
  • [x] LifeCycle
  • [x] React Components
  • [x] Components Update
  • [ ] JSX

Install

yarn add zzeact
npm install zzeact --save

Quick Start

var Examples = Zzeact.createClass({
  render: () => Zzeact.DOM.p(
    {
      style: {
        margin: 0,
        fontSize: 16,
        color: 'red'
      }
    },
    'Zzeact is rendered'
  )
})

Zzeact.renderComponent(
  Examples(null, 'children'),
  document.getElementById('container')
)

Now, You can using type="text/jsx" beacuse i integrated JSXTransformer.js

/**
 * @jsx Zzeact.DOM
 */
const ExampleApplication = Zzeact.createClass({
  render: function () {
    const style = { margin: 0, fontSize: 16, color: 'red' }
    return <p style={style}>Zzeact is rendered</p>
  }
})

Zzeact.renderComponent(
  <ExampleApplication />,
  document.getElementById('container')
)

Or, you can see examples.

License

MIT

Current Tags

  • 0.3.5                                ...           latest (7 months ago)

6 Versions

  • 0.3.5                                ...           7 months ago
  • 0.3.4                                ...           7 months ago
  • 0.3.3                                ...           7 months ago
  • 0.3.2                                ...           7 months ago
  • 0.3.1                                ...           7 months ago
  • 0.3.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 6
Last Month 6
Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |