Why is nextjs app reloading when I hit API endpoint? #33172
Unanswered
Hemanth-M-K
asked this question in
Help
Replies: 2 comments
-
wondering |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just running in to the same issue 3 years later. @Hemanth-M-K did you end up figuring out the issue? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a nextjs app that is running with two pages:
/demo
/api/signup
For some reason when I first hit the /api/signup endpoint (or simply refresh the page) it will trigger a HMR reload of the app. This also happens when making fetch calls to the api, the app reload's the the request made to the API does not work because of the interruption. Why is this happening?
Subsequent calls to the api will not result in a reload.
This happens when using next dev and next build && next start.
you can check more information in stackover flow (https://stackoverflow.com/questions/70498603/why-is-nextjs-app-reloading-when-i-hit-api-endpoint)
Beta Was this translation helpful? Give feedback.
All reactions