Disable fast refresh for Create React App


In Create React App 4.0, react-refresh was added.

However, this experimental feature causes the page to no longer hot reload when files like index.js are edited and saved (see #9984).

The fix is to disable the environment variable FAST_REFRESH:

# .env
FAST_REFRESH=false

This can be done using bash in the command-line:

echo 'FAST_REFRESH=false' >> .env

Once you restart your development server, edits to index.js should trigger an automatic page refresh!



Please support this site and join our Discord!