Why Should You Learn Next.js?
Lee Robinson / November 07, 2019
4 min read • ––– views
You've heard great things about this new web framework called Next.js, but you're still not sure why people are using it.
One way to understand why you should learn Next.js is to understand what problems it solves. This directly translates to why it's become so popular.
Let's say you're a new startup trying to launch a website. You might have some requirements like:
- Splash page with information about the product
- About page describing the team
- Frequently asked questions
- Capture leads through a contact form
- Subscribe to a newsletter
However, if we have some foresight, we might know that future requirements call for a user authentication flow and the beginnings of a SaaS product.
The real value in using a framework is developer productivity, shared knowledge, code reuse, and creating a platform for the future. If we start with React/Next.js, we can satisfy the initial requirements with ease and pave the way for the next iteration of the product.
Why? With React, you can build anything from simple marketing splash pages to full-fledged web applications on the scale of Facebook. It's flexible and composable. Developers love this.
For companies, this means you're more likely to find employees who already know React. For developers, this makes a very advantageous skill to add to your skillset.
According to NPM trends, it's outpacing other web frameworks like Angular and Vue by ~5 million installs/day.
Next.js solves both of those problems using server-side rendering. Next's framework allows you to build scalable, performant React code without the configuration hassle. That's why so many companies depend on Next for shipping production applications.
Wouldn't it be nice to not have to worry about this?
- Next.js supports IE11 and all modern browsers out of the box. Babel is configured for you, with an escape hatch to override if you need to.
- Want to handle routing with CRA? That will require react-router (or a similar library). Next.js has file-system based routing out of the box. No extra installation!
Did I mention Next.js can handle static sites, too?
next build will pre-render routes without data fetching to static HTML.
You can also use
getStaticPaths to generate a static site with dynamic data.
Plus, you can deploy in a few clicks to Vercel.
Next has so many features it's hard to capture the breadth in a single article. I would highly recommend checking out their website, trying out an example, and seeing if Next.js can help you build web applications faster.
Subscribe to the newsletter
Get emails from me about web development, tech, and early access to new articles.
- subscribers – 31 issues