Hello World
Have a look at the simplest example with Conan State.
Easy to create and render
//name: counter, initialState: 0
const yetAnotherCounter$ = Conan.light('counter', 0)function render() {
return yetAnotherCounter$.renderLive (
(counterValue)=>(<h1>{counterValue}</h1>)
)
}
Easy to update
function render() {
return (<div>
yetAnotherCounter$.renderLive (
(counterValue)=>(<h1>{counterValue}</h1>)
)
<button onClick={()=>yetAnotherCounter$.do.update(3)}>
setValueTo3
</button>
<button onClick={()=>yetAnotherCounter$.do.update(current=>++current)}>
increase by one
</button>
</div>)
}
Easy to do async updates
