Simple counter composable with initial value parameter. Allows creating a counter with a custom starting value.

const myCounter = useSimpleCounter(10)
myCounter.value // Returns 10
  • Parameters

    • val: number

      Initial value for the counter

    Returns any

    Reactive counter initialized to the provided value