Don't trigger reloads when working with HMR

This commit is contained in:
Dane Everitt 2019-12-07 11:03:23 -08:00
parent ed50259484
commit 976ad7497f
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 8 additions and 0 deletions

View File

@ -2,5 +2,13 @@ import React from 'react';
import ReactDOM from 'react-dom';
import App from '@/components/App';
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'));