What are the negatives of Nextjs?

We're exploring nextjs for a clients project and so far everything looks so peachy and great.

What are the negatives of nextjs that we, as newcomers to the framework, aren't seeing?

Did you find this post useful? Show some love!
DISCUSSION (8)

It depends on your client project. Here are few things you need to consider while choosing nextjs.

  • SEO
  • performance
  • Project size
  • developers taste.
  • life span of project and maintainance.

Here is my personal opinion on nextjs, nextjs oversimplifies the most of the configurations and workflow which is good for pet projects. but for enterprise applications I recommend creating your custom framework.

I disagree.

It's a lot more flexible than you are assuming here.

Next.js is built in a way that gives you access to a lot of the lower level SSR stuff. Using what you need when you need it. It is extremely flexible in what it does.

And there's plenty of enterprise applications out there that use next.js. I'd argue that for 90% of applications it would fit the bill. Unless you needed extremely fine grained control on the rendering process / routing (next already gives you significant control over both of these) or if you have a massive budget / team to build your own universal set-up (even then given the technical technical debt and maintenance cost that comes along with this would still push me in the direction of using next.js) or if you had to integrate a non-react render pipeline / build process app, but even then, because of the "use-what-you-need" set-up of next.js I still think you could pipe that in.

Eric Elliott, Dan Abramov and many other people who are much smarter than I sing it's praises.

Also, I'd argue SEO is kind of irrelevant here, it's server rendered and easily crawlable by bots. As with any rewrite or changes to mark-up, content etc it will have an effect. But the framework used to render the app shouldn't have an effect. Next does code splitting for page level components, so in terms of asset sizes too, that's up to the Dev team to keep an eye on.

However, I am a total fanboy 😀.

Anyways, I'd say it's far more powerful than just for use in pet projects.

Node isnt the best at doing blocking tasks (rendering a massive template is blocking).

Not Next specific but a general "isomorphic" JavaScript is losing track of whether you're in the client or the server.

It's not mega tricky. But it does get a bit of getting used to. Such as remembering which lifecycle methods are called on where. Eg if you have things you only do on the client use componentDidMount you can also test for webpack's process.browser.

In short, you just have to think a little bit more about where your code is going to run.

Regarding blocking, agreed, rendering a react app to a string is hectic resource intensive, but you can use next as a handler in express and render to string and cache the result. Also, if you're using next as a renderer you can also do use node in whatever server you're running to spawn / fork processes if need be.

Yep the question was about the negatives, the fact that I only had 2 gripes is actually a sign of how well thought out Next is.

Yeah, it is pretty good for an "off the shelf" framework.

Hi Sergio,
as always it depends on your needs.

I used Next.js when only was 6 months old and my experience was really good. The project requires: SEO, so Next.js works fine making the SSR of the first request and then working as a SPA.

My only negative is SSR could be a bit slow if you have tons of requests.

Ben Halpern DEV.TO FOUNDER

Hey there, we see you aren't signed in. (Yes you, the reader. This is a fake comment.)

Please consider creating an account on dev.to. It literally takes a few seconds and we'd appreciate the support so much. ❤️

Plus, no fake comments when you're signed in. 🙃

What peachy and great about NextJS to you ?

Classic DEV Post from Aug 8

Should tech companies use quotas to increase diversity?

Experts in diversity and inclusion share their thoughts on whether companies need to use quotas to increase diversity when hiring.

READ POST
Follow @lynnetye to see more of their posts in your feed.
Sergio Tapia
Fitness, cosmic horror, functional programming! Elixir, Ruby and Javascript are my tools! Miami!
Trending on dev.to
Mint vs JavaScript (stack)
#mintlang #javascript #webdev
Set up React Toolchain from the Ground up
#react #webpack #babel
Qlik ❤ D3
#d3 #javascript #qlik #data
What's your opinion on Coding Bootcamps?
#discuss #beginners #javascript #webdev
CookList : From idea to project to finished app
#angular #spotify #webdev #javascript
React Native: The missing piece in the beginner’s guides.
#react #reactnative #webdev #javascript
Building a modal in React.
#javascript #react
A JavaScript Haiku
#javascript #haiku