DEV Community

Truong Hoang Dung
Truong Hoang Dung

Posted on

3

NextJS and its genius ideas

Everyone loves ReactJS.

JS frameworks blow the world out there with each new framework each week.
But when we talk about a server-side-rendering framework, there're still limited choices.

I've played around with VueJS, FusionJS and NextJS and some other "smaller" SSR frameworks, my pick is NextJS, here's why.

  1. File-based routing.

Aha, i don't need to code anything to make my React application routable ! Even more, it's not only client-side routing, it's server-side routing , too.
I call it old-but-genius idea about how routing should be done.

The benefit here is, you'll get route-based code splitting for FREE !

  1. getInitialProps

In old versions of ReactJS, we have getInitialState, i'm sure React developers will miss it very much.
And NextJS "steals" that idea to make our React component got its initial data server-side rendered !

If you still not use NextJS yet, try it out today !

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (1)

Collapse
 
brokenthorn profile image
Paul-Sebastian Manole

Have you tried Nuxt?!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay