mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
888bd7c145
Co-authored-by: Daniel Roe <daniel@roe.dev>
4 lines
148 B
TypeScript
4 lines
148 B
TypeScript
export function useRandomState (max: number = 100, name = 'default') {
|
|
return useState('random:' + name, () => Math.round(Math.random() * max))
|
|
}
|