Reza Safari Blog
Published on

Updates about nextjs Tips

this post is merely an update on things I previously mentioned, and now, with the new changes in version 13, it's no longer accurate. However, if you are still using the previous version or haven't transitioned to appRouter yet, the previous points are still valid.

❌ Don't use Ant Design

✅ With the recent changes made to Ant Design, there's no longer a need to load the entire CSS upfront, and the previous issue has been resolved. but still ant design does not cooperate well with nextjs. there is much better tools out there. try mantine or radix.


❌ Use Next Future Image

✅ Its name has changed, and it has been replaced with the default Image component.


❌ Use PartyTown for external scripts like Google Ads and set the script loading strategy to Worker.

✅ If you are using appRouter, you still cannot use this, and you have to wait for its implementation.


❌ It's still too early to use Server Components.

✅ In version 13, it's now a default feature and works without issues.


❌ Only use Next.js API routes if you are 100% required to and have no other options. Avoid it as much as possible.

✅ The situation has improved significantly, and 90% of the previous issues have been resolved. However, this is in the context of using it with appRouter. The previous situation still holds for now.


❌ Depending on your needs, use packages like react-hydration-on-demand to improve loading speed. This requires experience to know when and where to use it. Do some research and learn how to use it effectively.

✅ With the presence of Suspense, there is no longer a need to use this tool.