Counter state composable for demonstration/testing purposes. Provides a reactive number that persists across component instances.
const counter = useCounter()counter.value++ // Increments the global counter Copy
const counter = useCounter()counter.value++ // Increments the global counter
Reactive counter value initialized to 0
Counter state composable for demonstration/testing purposes. Provides a reactive number that persists across component instances.
Example