欢迎使用 Tiio
一个类似于react的前端库。
安装使用
npm install tiio
import tiio from 'tiio' const App = { state(){ return { test:1 } }, mounted(){ setTimeout(()=>{ this.state.test = 2 },1000) }, methods:{ test(){ this.state.test++ } }, render( { id }, { test } ){ return <div id={ id } onclick={ ()=>this.test() }> { test } </div> }} tiio.render(<App id="1"/>, document.body)
License
MIT