By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: If You’re Going to Use Next.js — At Least Use it Right | HackerNoon
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > If You’re Going to Use Next.js — At Least Use it Right | HackerNoon
Computing

If You’re Going to Use Next.js — At Least Use it Right | HackerNoon

News Room
Last updated: 2025/05/15 at 3:11 PM
News Room Published 15 May 2025
Share
SHARE

I come across a lot of projects built with Next.js that are full of use client and hooks written like it’s a standard React SPA.

Abusing use client kills the benefits of React Server Components (RSC). If you’re choosing Next.js, keep this mindset: server-first, with client-side code as the exception.

Use the native API whenever possible — and read the documentation. The API is built by a team of engineers who know exactly what they’re doing. It solves most use cases by design.

Here are some tips for React devs moving into Next.js:

  • Don’t install Axios for SSR apps — unless you truly need interceptors. In most cases, the native fetch is a better choice: it’s optimized, aware of server/client contexts, and supports built-in caching.
  • Avoid using generic form libraries on the client. Use native form actions with server actions, paired with validateRequest() and schema.parse() (Zod, Yup, Joi, etc). Only use them on the server. Use react-hook-form only if your form is really complex and client-heavy.
  • Don’t install SWR or React Query unless you have a clear need. Next.js already supports caching and revalidation with native fetch() and cache().
  • Default to server components whenever possible and avoid managing state on the client. The more logic and data you keep on the server, the less JS you ship to the client — simple as that. Of course, sometimes client-side code is unavoidable, but treat it as a last resort.
  • Use Suspense and the loading.tsx file inside routes — stop using spinners with client state. Next.js handles route-level async loading out of the box.
  • Drop styled-components completely. It’s no longer maintained, and it’s client-side by nature — requiring hacks to work properly with SSR. Just use Tailwind CSS — it comes preconfigured in most modern boilerplates anyway.
  • Leverage middleware.ts when you need authentication, redirects, or geolocation. It runs before the render phase, using Edge Runtime — zero render cost.
  • Finally, don’t use Next.js just for the routing. If all you need is file-based routes or if your app is mostly client-rendered, just use React + Vite. You’ll get faster builds, smaller bundles, and no SSR overhead.

Bonus tip: Learn the basics of RSC and understand what “Composable Streaming Architecture” actually means. That’s the only way to really use Next.js the way it was designed.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Stream smarter, not harder: Lifetime Access to BitMar is A$23
Next Article Elden ring nightreign, doom: the dark ages round up the biggest games of May
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Chrome for Android could soon automatically fill verification codes sent via SMS
News
How close is quantum computing to commercial reality? | Computer Weekly
News
Carrie flees to Nashville after fans call for her to be fired from American Idol
News
Sky TV is down after major outage left 30,000 users without access to shows
News

You Might also Like

Computing

Tencent Q1 profit rises 14% as AI investment begins to pay off · TechNode

1 Min Read
Computing

👨🏿‍🚀 Daily – Fawry takes flight |

4 Min Read
Computing

Ubuntu 25.10 Planning For Good NVIDIA On Wayland Experience, VRR & RISC-V Desktop

2 Min Read
Computing

Motion vs. Google Calendar: Which Scheduling Tool Is Better?

27 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?