sycamore::web

Function use_stable_counter

pub fn use_stable_counter() -> u32
Expand description

Get the next counter value. This is stable across client and server side.

The counter is stored in the global scope so that it is shared across the entire app. It is initialized to 0 and incremented everytime this function is called.