mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
5a17458af5
Co-authored-by: Ohb00 <43827372+OhB00@users.noreply.github.com>
8 lines
213 B
TypeScript
8 lines
213 B
TypeScript
export const useSleep = () => useAsyncData('sleep', async () => {
|
|
await new Promise(resolve => setTimeout(resolve, 50))
|
|
|
|
return 'Slept!'
|
|
})
|
|
|
|
export const useCounter = () => useFetch('/api/useAsyncData/count')
|