Next.js Discord

Discord Forum

Why is nextjs so slow all of a sudden

Answered
In&Out posted this in #help-forum
Open in Discord
Didn't do next in like a month, made new project, did some stuff and now everything is so much slower, when i refresh it takes too long, 90% of saving would end up in hard refresh, whats up?
Answered by Pearls
Theres a big chance that you have some bad code, for example:
A useEffect that does an api request, saves the result of it in an array, but the useEffect depency is also that result variable (infinite loop of api requests)

About the hard refresh, theres some sort of frontend error happening which results in a full rerender.
View full answer

17 Replies

Theres a big chance that you have some bad code, for example:
A useEffect that does an api request, saves the result of it in an array, but the useEffect depency is also that result variable (infinite loop of api requests)

About the hard refresh, theres some sort of frontend error happening which results in a full rerender.
Answer
for data i am using faker.js
i am using vivaldi, would that do something?
I mean, even if its data related, before it didnt take THIS much time
Could you share your project/code?
@In&Out i am using vivaldi, would that do something?
Uhm, it could, possibly? but its not likely
@Pearls Could you share your project/code?
too big
@Pearls Uhm, it could, possibly? but its not likely
hmm, let me try
yeah, its browser
thats so weird....
@In&Out too big
im confused, you said you creatde a new project? either way you could just post the project on github. but thats fine ig
@In&Out yeah, its browser
that is very odd
Alright well, good luck with your project!
thx m8