Don't trigger reloads when working with HMR
This commit is contained in:
parent
ed50259484
commit
976ad7497f
1 changed files with 8 additions and 0 deletions
|
@ -2,5 +2,13 @@ import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import App from '@/components/App';
|
import App from '@/components/App';
|
||||||
import './i18n';
|
import './i18n';
|
||||||
|
import { setConfig } from 'react-hot-loader';
|
||||||
|
|
||||||
|
// Prevents page reloads while making component changes which
|
||||||
|
// also avoids triggering constant loading indicators all over
|
||||||
|
// the place in development.
|
||||||
|
//
|
||||||
|
// @see https://github.com/gaearon/react-hot-loader#hook-support
|
||||||
|
setConfig({ reloadHooks: false });
|
||||||
|
|
||||||
ReactDOM.render(<App/>, document.getElementById('app'));
|
ReactDOM.render(<App/>, document.getElementById('app'));
|
||||||
|
|
Loading…
Reference in a new issue