NuxtN
Nuxt5mo ago
4 replies
Doodie

Functions gets called twice.

I have a button calling a function using @click binding.

In there i have a simple API call await $fetch("http://localhost:8080/")

But that request gets sent twice during development.

I understand its because it gets ran on the server and also the client. How do i make it only run on the client, or only on the server. but not both
Was this page helpful?