Next.js Discord

Discord Forum

How to optimize in NextJS?

Unanswered
Tuyền posted this in #help-forum
Open in Discord
Currently I have a project running on nextjs, but there is no API call on the server but when router push takes a long time. Is there any way I can optimize it?

13 Replies

do u have ssr components
router.push waits for server server components to load
@gin router.push waits for server server components to load
i'm just use it like that
@Tuyền i'm just use it like that
that is pages router
cant help u with taht
i recommend switching to app router
much more optimized
@gin that is pages router
that's right, because this project belongs to my company so i can't change it
do you have any other advice?
.
tell ur chef to switch to app router