Hendrik Jan
Error "currentRenderingInstance is null" since upgrade of Nuxt
A bit more info: the error only happens the first time after the nodejs server is reloaded. I've set ssr:false so it's not a hydration problem. Als the problem is only in dev mode, not when building.
5 replies
Can you use useFetch twice in one composable, once on server, once in client?
In case someone else wants to solve a similar problem, here is a working reproduction with some accompanying text: https://stackblitz.com/edit/github-o9ivmk-qkcdj8?file=app.vue
15 replies
Can you use useFetch twice in one composable, once on server, once in client?
When I click the refresh-button I first see "[0,1,2]" (which I think is rendered on the server) and after a fraction of a second this is changed to "[0,1,2,3,4,5,6,7,8,9]", so it seems to work.
15 replies
Can you use useFetch twice in one composable, once on server, once in client?
Oh, I think I'm getting at it.
If is set
server:false, lazy:false
for the second useFetch()
, the useFetch()
will be run twice (once on server, once on client), but the first (on server) returns "null" and the second (on client) return "[3,4,5,6,7,8,9]".15 replies
Can you use useFetch twice in one composable, once on server, once in client?
I guess you are right in that, but I don't really understand how to do it different.
Isn't the
await
(before the second useFetch()
making sure that we are waiting until the data is ready?
I try to have the first part of my composable to take place on the server and the second part to take place on the client.
I also tried hooks, but to no avail yet.15 replies