mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 00:23:53 +00:00
docs: update useFetch troubleshooting section (#28918)
This commit is contained in:
parent
0e8f5ae59d
commit
bd10a95216
@ -70,6 +70,10 @@ const { data, status, error, refresh, clear } = await useFetch('/api/auth/login'
|
|||||||
`useFetch` is a reserved function name transformed by the compiler, so you should not name your own function `useFetch`.
|
`useFetch` is a reserved function name transformed by the compiler, so you should not name your own function `useFetch`.
|
||||||
::
|
::
|
||||||
|
|
||||||
|
::warning
|
||||||
|
If you encounter the `data` variable destructured from a `useFetch` returns a string and not a JSON parsed object then make sure your component doesn't include an import statement like `import { useFetch } from '@vueuse/core`.
|
||||||
|
::
|
||||||
|
|
||||||
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=njsGVmcWviY" target="_blank"}
|
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=njsGVmcWviY" target="_blank"}
|
||||||
Watch the video from Alexander Lichter to avoid using `useFetch` the wrong way!
|
Watch the video from Alexander Lichter to avoid using `useFetch` the wrong way!
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user