There are two ways to declare a component in brisk-reconciler:
- By using a normal function
let%component counterButtons = () => {
let%hook (count, setCount) = Hooks.state(0);
<view>
<button title="Decrement" onPress={() => setCount(count => count - 1)} />
<text text={"Counter: " ++ str(count)} />