Next.js Fast Refresh
In this article, we will learn about the Fast refresh in the NextJS project. Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components. It is now enabled by default for all projects on Next.js 9.4 or newer.
NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different platforms like Windows, Linux, and mac. The linking of dynamic paths helps in rendering your NextJS components conditionally.
Create NextJS Application: You can create a new NextJS project using the below command:
npx create-next-app gfg
Project Structure: It will look like this.
All the NextJs applications with version 9.4 or newer come with the Fast refresh feature that gives you instantaneous feedback on edits made to your React components.
Here we created a simple react component named index and inside this component, we add one heading. Now after running the application if we make any changes in our gfg.js file then the changes will be visible within a second, without losing component state.
Steps to run the application: Run the below command in the terminal to run the app.
npm run dev
Please Login to comment...