DEV Community

Cover image for Next.js: The Future Of React?
Arjun Vijay Prakash
Arjun Vijay Prakash

Posted on

Next.js: The Future Of React?

๐Ÿ’ก Introduction

Next.js is becoming more and more popular recently.

This article explains exactly why it's getting called "The Future Of React" and what improvement does it do to our favourite React.

Vercel calls it "The React Framework for the Web".

Let's see why.


๐Ÿง  TL;DR

  • Next.js is a React framework for building full-stack web applications. It provides extra functionalities on top of React.js

  • SSR(Server-Side Rendering) offers several benefits, including improved performance and enhanced SEO.

  • Rendered data can also be cached to improve performance further, which makes it easier for search engines to index the content.

  • Next.js also takes care of SEO and Performance.


๐Ÿคจ Why do I need to use another framework?

I can just use React.js which is already a library!

Well, you can build cool applications with React, but by using a framework like Next.js, you will be creating a React.js app but with some extra superpowers(read till the end for a better understanding of what I'm referring to).


๐Ÿš€ Here's all you need to know about Next.js

and why it is so good:

Next.js is a React framework that enables the following:

โœ… Middlewares
โœ… Typescript Support
โœ… Fast Code Refresh
โœ… Server Side Rendering
โœ… Static Site Generation
โœ… Incremental Static Regeneration
โœ… SEO, Images and Font Optimizations
โœ… Optimized for Production Out of the Box
โœ… Improved development and deployment toolchain (w/ Vercel)

and many more...


๐Ÿ’ช What are the benefits of SSR with Next.js?

Letโ€™s talk about it from two angles: Performance and SEO. โœจ

By rendering on the server, the fully-rendered initial state of an application can be served up on a single request.

What does that mean?

This means less work for the browser to do, and it also means that the content can be easily indexed by a search engine.

It also means rendered data can be cached (in part or in whole) to improve performance even further.

These Next.js features, along with others, help to build on Reactโ€™s strong foundation.

They also make up for some of the disadvantages of a solely client-side rendering.

If SEO and performance matter to you, Next.js is an amazing addition to your tech stack.


๐Ÿ†š Next.js V/S React.js

In a typical React application, the source code of an application will not be available initially and is populated later using JS when the files are requested from a server by a browser.

This creates a problem for search engines as their crawlers will not be able to crawl the websites beforehand which results in search engines not listing/ranking these websites.

This causes problems for social media applications as well.

They arenโ€™t able to generate a preview of the application(refer to the image below).

Image


๐Ÿค” Final Thoughts

But, the question remains, Would you use Next.js over any other framework? and why?

Is it the future of React.js and Frontend Development?

I hope you liked the article! โค๏ธ

Connect with me: linktree

Happy Coding! ๐Ÿš€
Thanks for 18744! ๐Ÿค—

Top comments (7)

Collapse
 
_ndeyefatoudiop profile image
Ndeye Fatou Diop

I really like next.js for personal projects because it helps me get started quickly. However when it comes to work, I donโ€™t use nextjs since the FE is more complex and would hit nextjs limitations

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Nice!

But I disagree here, Next.js is framework that can help build all sorts of complicated things on the internet.

It has special features that can handle difficult tasks, so it's good for making complicated websites too.

Collapse
 
rouaabelhajali profile image
RouCodes

1.I agree , and next js performance is much faster than react js .

Thread Thread
 
haintwork profile image
Harry Nguyen

Why nextjs is much faster than react while it's based on react?

Thread Thread
 
amauryvasquez profile image
Amaury Vasquez

Due to Server Side Rendering

Collapse
 
ashishagarwal profile image
Ashish Agarwal

Remember that next.js is only when you are building a app that needs back-end. If you are testing out a library, like a design one, React is enough.
React: only front-end and basic back-end
Next.js: full-stack

Collapse
 
shubhsharma19 profile image
Shubh Sharma

Great explanation!