Skip to main content

Counter

In this example, a counter value is stored in a state manager.

When the ring is clicked the .set method will be called to increase the counter by 1.

When the "Reset" button is clicked, the .reset method will be called to reset CounterState back to 0.