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
Avatar
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

Avatar
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
Avatar
Could you share your project/code?
Avatar
@In&Out i am using vivaldi, would that do something?
Avatar
Uhm, it could, possibly? but its not likely
Avatar
@Pearls Could you share your project/code?
Avatar
too big
Avatar
@Pearls Uhm, it could, possibly? but its not likely
Avatar
hmm, let me try
yeah, its browser
thats so weird....
Avatar
@In&Out too big
Avatar
im confused, you said you creatde a new project? either way you could just post the project on github. but thats fine ig
Image
Avatar
@In&Out yeah, its browser
Avatar
that is very odd
Avatar
Alright well, good luck with your project!
Avatar
thx m8