wili
Wili is a 2kb Light-weight react-like maximum-optimistic library for building user interfaces.
Usage
Welcome componenet:
class Welcome extends Wili.Component {
state = {i: 0, interval: null}
componentDidMount = () => {
this.state.interval = setInterval(() => {
this.setState({i: this.state.i + 1})
}, 1000)
}
componentDidUnmount = () => clearInterval(this.state.interval)
render = () => `Welcome to Wili project. Forcing update No. ${this.state.i}
`;
}
App componenet:
Wili framework
class App extends Wili.Component {
render = () => {
return `
Wili framework
${new Welcome()}
`;
}
}
Index file:
">
Wili
Related libraries
- Wili Router: A 1kb light-weight maximum optimistic router for Wili library.