Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Functions gets called twice. - Nuxt
N
Nuxt
•
6mo 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
Nuxt
Join
Nuxt Community Chat Server
31,686
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
useFetch with reactive variables called twice
N
Nuxt / ❓・help
6mo ago
pages onMounted hook being called twice when switching layouts in app.vue
N
Nuxt / ❓・help
15mo ago
OnMounted twice
N
Nuxt / ❓・help
2y ago