Tutorial: Atom
Declare a count with atom() and show it in JSX.
You declare reactive values with atom(). Reads during render subscribe the component. Writes rerun it.
Similar concepts
- React:
useState - Vue:
ref() - Svelte:
$state()
Declare a count with atom() and show it in JSX.
You declare reactive values with atom(). Reads during render subscribe the component. Writes rerun it.
useStateref()$state()Was this page helpful?
Thanks for your feedback!