What is NextJS and why I should use it in my project?

Next.js is a JavaScript framework that enables you to build superfast and extremely user-friendly static websites, as well as web applications using React. NextJS is called The React Framework for Production for developing single-page JavaScript applications. It gives you a great developer experience with many features, like

  • hybrid static & server rendering
  • TypeScript support
  • smart bundling
  • route pre-fetching
  • and much more

Not only is NextJS known for fast refresh - because it is clever enough to only load the JavaScript and CSS that are needed for any given page - but also for fast installing when creating a new project, and lower dependency size.

The file-system-based router is built on the concept of pages. This means, when a file is added to the pages directory it’s automatically available as a route. Nested files are supported too.