Next.js Limitations
Ok so I'm considering next.js for my next project for that juicy SEO and page load time. I'm concerned I might want to do something I normally do in react and next.js won't be capable and I'll have to scrap it and rebuild with a normal stack.
My question is, can you do everything in nextjs that you can do in react? Or since it's rendered on the server, once it goes to the client it no longer behaves like a react app (re rendering with state change)?
15 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@complexengine so next is just react but better? Or are there any limitations aka any reason to use regular client side rendered react instead
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I mean it's full stack just all in the same project right
So if I understand, next.js's react is the same react as client side rendered react, same capabilities. So there's really no good reason to use react by itself if you want good SEO and page load time.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@complexengine by next js's react I mean the way it renders it server side. I know if I want client side react I use cra or vite, I know if I want server side I use next. It's not helpful to state that. I'm trying to understand why someone would want to use vite over next
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Cause if there's nothing that nextjs can't do that vite can do, to me server side rendering just seems better
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Here we go this is what I'm looking for ty. Cons of nextjs. This is a good point, it's probably way easier on the server and the server doesn't need to support nodejs to serve the site with client side rendering
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yeah but that's static then right
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
"Or since it's rendered on the server, once it goes to the client it no longer behaves like a react app? " Next still sends the react code with the content filled server generated html when SSR'ed. I get your question, with next.js you can do anything + more than whatever you can do with CRA or Vite, routing is opinionated as a most dramatic thing.
Astro on the other hand, doesn't ship react by default, but you opt-in with some ways, but you lose other stuff like client side state management since its mpa
Next gives you the most flexibility among the frameworks in that sense, hence it's popularity.
Nice thanks for confirming that. Already started learning next, gonna use it for next project. @Barış-Pal