Automatically Reload/Refresh browser when making code changes on React

If you have bootstrapped the react app using npx create-react-app my-app then you would probably want your browser to refresh every time you make changes to your file.

You could do this by adding .env file in root of your project, and add FAST_REFRESH=true.

This is it! You can now easily make changes and see those being reflected in real time on browser.

For advance configuration, this link is recommended

Day 2/100



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store