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 11import React from 'react' ;
22import ReactDOM from 'react-dom' ;
3+ import { autorun } from 'mobx' ;
34import './index.css' ;
45import App from './components/App' ;
56import store from './stores' ;
67import registerServiceWorker from './registerServiceWorker' ;
78
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+
1521registerServiceWorker ( ) ;
You can’t perform that action at this time.
0 commit comments