mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
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))
|
||
|
}
|