Try it
Change the source and the output beside it follows.
Change the source and the output beside it follows. This is the compiler the build uses, running in your browser as WebAssembly.
Counter.tsxtsx
import { useStore } from "@shadow-js/core";
export function Counter() {
const [count, setCount] = useStore(0);
return (
<button type="button" class="counter" onClick={() => setCount((n) => n + 1)}>
Clicked {count()} times
</button>
);
}