Why and How to get started with NextJs
Once I got familiar with SPA(Single Page Application), I was trying for a much simpler way to create website. In react also it is simple enough but if you want to create Universal Apps then it is a bit difficult to achieve for beginners. There are lots of tools available (such as react-snapshot) but doing it the standard way is still not very straight forward despite the fact that idea behind is very simple.
So I was creating a new tutorial on using CMS with SPA and decided to use NextJS. I followed the official tutorial and created the app.
What I found about NextJs?
- Trusted by World’s Leading Companies who Use and Love Next.js famous companies (+1 to it’s credibility).
- Easy to use. All you got to know to use NextJs is React.
- It gives SSR(Server Side Rendering) out of the box. This is used to create Universal Apps.
- Creating routes is as simple as creating a new file with default react component. These routes supports both, client side and server side routing (Given one use provided Link component from NextJs).
- Gives you an easy way to export your app as Static Site.
- Very useful function getInitialProps.
For information on NextJs, follow this link.
For a tutorial or sample app follow this tutorial.