Skip to content
Advertisement

Tag: anonymous-function

How to pass params in Nuxt 3 server/api?

I can’t figure it out how to pass params to an anonymous function in Nuxt 3. index.vue: server/api/sign_up_news.js: working: Do you know how to pass parameter into Nuxt 3 server/api? Or do you got a source? The official docs are blank at this moment. Answer Use useBody Its mention in the docs: https://v3.nuxtjs.org/guide/features/server-routes#handling-requests-with-body you just need to read through

addEventListener firing multiple times for the same handle when passing in arguments with anonymous function

For some reason, the event listener is firing twice for each element when passing arguments into an anonymous function. I.e., the click event on element el will register once and, thus, fire once. But if I want to pass my own arguments to it, it will register and fire twice. The question is why and what’s the solution? I looked

Advertisement