A
Alokai•15mo ago
jbialon

No request call on page refresh

Hello, Currently I'm playing with storefront-nuxt3-boilerplate + custom integration (sdk/api-client). Is anybody here have a problem with useAsyncData on page refresh? When I go too, for example /category by clicking on header, useAsyncData works perfectly fine and you can see request with proper response in network, BUT when you refresh that page (/category) than there is no request in network, and you can see null response in console.log after the call. Not sure if that topic is related https://github.com/vuejs/core/issues/5844 ?
GitHub
+ means mounted() runs too early · Issue #5844 · vuejs/core
Version 3.2.33 Reproduction link stackblitz.com SFC Playground Steps to reproduce Click the Toggle component button in the reproduction, and observe that a template ref is null rather than defined....
3 Replies
rohrig
rohrig•15mo ago
Hi @jbialon 👋 , when you say network, do you mean the network tab in the browser?
jbialon
jbialonOP•15mo ago
yes, network tab also, looking for solution I found that wrapping useAsyncData in nextTick(async () => {}) solves the problem, which could mean that its the problem that I linked to^
rohrig
rohrig•15mo ago
Maybe I'm missing your point, but useAsycData shouldn't show up in the browser's network calls when doing a hard refresh, so this is normal. It's making the call on the server side. Are there other symptoms you're dealing with?
Want results from more Discord servers?
Add your server