ez-react
ez-react copied to clipboard
A micro implementation of React.js and ReactDOM named '@cw1997/ez-react' and '@cw1997/ez-react-dom' You can use these libraries as a mini edition of official React.js and ReactDOM.
ez-react
This is a simple implementation of React.js and ReactDOM named '@cw1997/ez-react' and '@cw1997/ez-react-dom'
You can use these libraries as a mini edition of official React.js and ReactDOM.
Features
- Generating VirtualDOM from JSX createElement function
- function component
- class component
- Binding 'this' point in the class component's event handler automatically
- Life cycle
- Re-render when the state changes
- Ref API
Demo
Online
https://ez-react.changwei.me/
Local
git clone [email protected]:cw1997/ez-react.git # or https://github.com/cw1997/ez-react.git
cd ez-react
pnpm install
cd packages/ez-react-demo
npm start