2020-05-24 19:02:54 +02:00
|
|
|
huh ?
|
|
|
|
====
|
|
|
|
|
|
|
|
#### Minimalistic jsx like syntax framework
|
|
|
|
```
|
|
|
|
import huh from 'huh'
|
|
|
|
|
|
|
|
class Hello {
|
|
|
|
render() {
|
|
|
|
return <h1>Hello</h1>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const start = () => {
|
|
|
|
const title = new Hello()
|
|
|
|
const arr = ['w','o','r','l','d']
|
|
|
|
const components = []
|
|
|
|
arr.forEach((el) => {
|
|
|
|
components.push(<span>{el}</span>)
|
|
|
|
})
|
|
|
|
const handleClick = () => {
|
|
|
|
alert('hi')
|
|
|
|
}
|
2020-05-24 19:04:50 +02:00
|
|
|
const btn = <button onclick={handleClick}></button>
|
|
|
|
return (<div>
|
2020-05-24 19:02:54 +02:00
|
|
|
{title}
|
|
|
|
{components}
|
|
|
|
<br />
|
|
|
|
{btn}
|
2020-05-24 19:04:50 +02:00
|
|
|
</div>)
|
2020-05-24 19:02:54 +02:00
|
|
|
}
|
|
|
|
document.getElementById('main').appendChild(start())
|
|
|
|
```
|
|
|
|
|
|
|
|
#### TODO
|
|
|
|
merge with this repo
|
|
|
|
* [ ] i18n
|
|
|
|
* [ ] history
|
|
|
|
* [ ] command / facade workflow
|
|
|
|
|
|
|
|
add example
|
|
|
|
* [ ] http
|
|
|
|
* [ ] publish / subscribe
|
|
|
|
* [ ] model
|
|
|
|
* [ ] random
|