site's icon
Published on

Next.JS - the production ready react on steroids framework


nextjs is a react based framework Next JS is an amazing JavaScript framework made on the existing react framework made by Facebook. Factors that make it amazing or the SEO features. Also Next JS as an inbuilt support for API structures which make it even more amazing when working with APIs.

Even the site is made with next. Yup.

It has a ton of inbuilt modules which makes development even more amazing text to image module as an instance. It automatically optimises the images as per the weight and height and other factors. The link module enables no refresh routing which fetches the JavaScript code and renders that instead of redirecting you to another page.

It's called react on steroids because of all these inbuilt module sentence of features which come along with next. Other frameworks like blitz.js are made on top of next.js, adding more functionalities to the framework. Next JS has a support for server side rendering which makes it incredibly faster than react and the content is available to web crawlers too.

Next v12 is now using rust compiler and is having 5x faster builds than before! next.ja is fast!


To initialise a next.js application, run:

npx create-next-app@latest
# or
yarn create next-app

You can create a TypeScript project with the --ts, --typescript flag:

npx create-next-app@latest --ts
# or
yarn create next-app --typescript

file systems in next

now see the file structure carefully

The pages directory is the entry point of the application as well as the URL structure of your website. That is, pages/about.js will be available at [url]/about

The public directory will contain your assets and other images for files which are not controlled by next. You can create as many folders and can also access them.

Like, making component folder which will contain usable components which you can reuse in different pages without writing same code every time.

wrapping up

Next js is an amazing framework for creating beautiful applications with react which perform amazingly in search results and performant on the user's side. It's evolving into other framework too like blitz.js which are having a bit of ruby like approach. Anyways, next is a must try if you're a react developer!