You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using useFetch or useAsyncData inside a component which is inserted into the DOM by a dynamic component, useFetch or useAsyncData won't use the data from the payload but calls the API endpoint again on client side which results in two calls to the REST API endpoint (SSR and Client). It should take the data from the payload instead of making another call on client side.
Additional context
This problem is crucial when working with Storyblok CMS as Storyblok mainly works with dynamic components.
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Reproduction
https://stackblitz.com/edit/github-5jqx3p?file=pages%2Findex.vue
Reload the index page and see that https://jsonplaceholder.typicode.com/posts is called again on client side although the data is present in the payload data.
Describe the bug
When using useFetch or useAsyncData inside a component which is inserted into the DOM by a dynamic component, useFetch or useAsyncData won't use the data from the payload but calls the API endpoint again on client side which results in two calls to the REST API endpoint (SSR and Client). It should take the data from the payload instead of making another call on client side.
Additional context
This problem is crucial when working with Storyblok CMS as Storyblok mainly works with dynamic components.
Logs
No response
The text was updated successfully, but these errors were encountered: