This repository was archived by the owner on Oct 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
packages/react-scripts/template/src Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
+ import { hot } from 'react-hot-loader' ;
2
3
import logo from './logo.svg' ;
3
4
import LogoInline from './logo.inline.svg' ;
4
5
import styles from './style.scss' ;
@@ -41,4 +42,5 @@ class App extends Component {
41
42
}
42
43
}
43
44
44
- export default App ;
45
+ export { App as AppUnwrapped } ;
46
+ export default hot ( module ) ( App ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
- import App from './index' ;
3
+ import { AppUnwrapped as App } from './index' ;
4
4
5
5
it ( 'renders without crashing' , ( ) => {
6
6
const div = document . createElement ( 'div' ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
- import { hot } from 'react-hot-loader' ;
4
3
import 'normalize.css' ;
5
4
6
5
import App from 'components/App' ;
7
6
import registerServiceWorker from 'utils/registerServiceWorker' ;
8
7
9
- const HotApp = hot ( module ) ( App ) ;
10
-
11
- ReactDOM . render ( < HotApp /> , document . getElementById ( 'root' ) ) ;
8
+ ReactDOM . render ( < App /> , document . getElementById ( 'root' ) ) ;
12
9
13
10
registerServiceWorker ( ) ;
You can’t perform that action at this time.
0 commit comments