useFetch status is success for a split second before changing to pending
I have the above code in my
index.vue
page. I also have another about.vue
page.
When index page renders in the browser for the first time (client-side navigation) the status is: idle => pending => success which is okay.
But when it renders for the second time the status is: success => pending => success
Why the status is success at first? Shouldn't it be pending from the start? How to fix it?
If I want to show a loading placeholder in that page, it will render contents at first then after a split second it will show placeholder which is a problem.2 Replies