Next.js Discord

Discord Forum

api route not updating onChange

Unanswered
Elite posted this in #help-forum
Open in Discord
so i have this api route that calculates a total fee
it runs with the onChange event listener on the frontend, and calls the backend api request.
when i restart the server, and i type in a number, it sometimes doesn't register the second number.
so if i do 22 as my input
it thinks the amount is 2
but then when i clear and try again, its fine

is it due to the api route not being compiled?
so its a dev server only thing?
should i make this api route on the edge?

1 Reply

Asian paper wasp
No one will be able to answer that unless you post some code