tiny jsx ui framework
🚧🚧🚧 WORK IN PROGRESS 🚧🚧🚧
import {h, render, Component} from 'flakr'
class View extends Component {
render() {
const {text, visible} = this.props
const listener = visible ? (() => console.log(1)) : (() => console.log(2))
return (
<div>
<button className="btn" onclick={() => console.log('hello cls')}>
{text}
</button>
{visible &&
<div>
visible
</div>
}
<ChildComponent listener={listener} value={Math.ceil(Math.random() * 10)} />
</div>
)
}
}npm install
cd examples
parcel index.html