File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed 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 { autorun } from 'mobx' ;
3
4
import './index.css' ;
4
5
import App from './components/App' ;
5
6
import store from './stores' ;
6
7
import registerServiceWorker from './registerServiceWorker' ;
7
8
8
- ReactDOM . render (
9
- < App
10
- stories = { store . storyStore . readableStories }
11
- onArchive = { ( objectID ) => store . archiveStore . archivedStoryIds . push ( objectID ) }
12
- /> ,
13
- document . getElementById ( 'root' )
14
- ) ;
9
+ function render ( ) {
10
+ ReactDOM . render (
11
+ < App
12
+ stories = { store . storyStore . readableStories }
13
+ onArchive = { ( objectID ) => store . archiveStore . archivedStoryIds . push ( objectID ) }
14
+ /> ,
15
+ document . getElementById ( 'root' )
16
+ ) ;
17
+ }
18
+
19
+ autorun ( render ) ;
20
+
15
21
registerServiceWorker ( ) ;
You can’t perform that action at this time.
0 commit comments