Create-react-app: How to disable refresh of a browser when hot reloading?

Created on 28 Feb 2017  路  2Comments  路  Source: facebook/create-react-app

Hi!

I'm new to React. This project helps a lot but react-hot-loader is super annoying for me.

When I edit code I save a lot and I don't want the browser to be refreshed at every change. However I like that the app is rebuilt automatically and I don't need to rerun npm start.

Can I disable browser refreshing on change somehow?

Most helpful comment

This project has no relation to React Hot Loader. In fact React Hot Loader does the opposite: it updates page in place without refreshing. React Hot Loader is not included in Create React App.

No, you can't disable refreshing in the default setup. If you want to customize this, you can either npm run eject and then configure Webpack as you like, or fork react-scripts and maintain your own version that doesn鈥檛 refresh automatically.

All 2 comments

This project has no relation to React Hot Loader. In fact React Hot Loader does the opposite: it updates page in place without refreshing. React Hot Loader is not included in Create React App.

No, you can't disable refreshing in the default setup. If you want to customize this, you can either npm run eject and then configure Webpack as you like, or fork react-scripts and maintain your own version that doesn鈥檛 refresh automatically.

If you're using Chrome, you can temporarily disable reloading by following these instructions:
https://github.com/facebookincubator/create-react-app/issues/2519#issuecomment-318867289

No changes to create-react-app are required.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fson picture fson  路  3Comments

barcher picture barcher  路  3Comments

dualcnhq picture dualcnhq  路  3Comments

Evan-GK picture Evan-GK  路  3Comments

jnachtigall picture jnachtigall  路  3Comments