mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
0b1cdcc70d
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
4 lines
140 B
TypeScript
4 lines
140 B
TypeScript
export function useRandomState (max = 100, name = 'default') {
|
|
return useState('random:' + name, () => Math.round(Math.random() * max))
|
|
}
|