0.3.5 • Published 5 years ago
zzeact v0.3.5
Zzeact
Zzeact is a JavaScript library to learn the source code of React.
Todo
- DOM render
- Event
- LifeCycle
- React Components
- 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.