An open API service indexing awesome lists of open source software.

https://github.com/serebano/bitbox-inferno-component

bitbox inferno component
https://github.com/serebano/bitbox-inferno-component

bitbox inferno-component

Last synced: 3 months ago
JSON representation

bitbox inferno component

Awesome Lists containing this project

README

        

# bitbox-inferno-component
https://serebano.github.io/bitbox-inferno-component/

```js
/** @jsx h */
import Component, { render } from "bitbox-inferno-component"

const Hello = [
function bit({ state, args }, { set, toUpper }) {
return {
value: state.name,
onInput: set(state.name, args[0].target.value(toUpper))
}
},
function box({ onInput, value }, h) {
return (

Hello {value}!




)
}
]

const Counter = [
function({ state }, { set, inc, dec }) {
return {
count: state.count(String),
inc: set(state.count, state.count(inc)),
dec: set(state.count, state.count(inc)),
}
},
function Counter({ count, inc, dec }, h) {
return (

{count}


+ inc
- dec

)
}
]

function App(props, h) {
return (




)
}

render(Component(App, {
state: {
name: 'Scooby Doo',
count: 0
}
}), "#root")

```

```
yarn install
yarn start
```