I have a Vite + Typescript + Vue 3 SPA using "script setup". The app uses Urql to query a GrapgQL endpoint.
I have a situation where query works and displays rows only after the component with the component is hotloaded.
Sequence of events:
The code can be seen in github: here
/src/components/TodoPrivateList.vue is where the data is returned (line 29). At line 71, it uses a child component TodoItem.vue to render each Todo.
I can now see, using Vue DevTools that the data is always retrieved, but the Todos are not rendered. It is only when I force a hot load of the TodoPrivateList.vue (by updating one of its comments) that the Todos are rendered.
So I now agree with @wittgenstein that this seems like a Reactivity issue. But I am not yet sure what to do.
Thanks in advance
Issue had nothing to do with Vite.
Issue was caused by not awaiting the response from the graphql query.
Implemented "Suspense" option in the parent component. (Vue 3 experemental option) and added 'await' to the query. Code pushed to GitHub.