v-for runs twice
I have no idea what is going on here. i have an api endpoint return a json array and then i use v-for to loop though them but for some reason it loops the original 3 but then loops though them again
4 Replies
i also get "error Hydration completed but contains mismatches." in the console and if i turn off ssr the duplicates go away
Move your fetching into
setup()
instead of created
Or even better, use the <script setup>
syntax
much more conciseoh yeah thank you
also noticed a funny thing i just cant access articles in the try catch unless i define the variable outside of it
Ah, yeah, that's true