Merge pull request #148 from 6ea86b96/remove-batching

Turns out that batchActions doesn't play nicely with thunk
This commit is contained in:
Jeremy Kauffman 2017-05-28 11:24:09 -04:00 committed by GitHub
commit a8667d18de

View file

@ -8,7 +8,6 @@ import SplashScreen from 'component/splash.js';
import SnackBar from 'component/snackBar'; import SnackBar from 'component/snackBar';
import {AuthOverlay} from 'component/auth.js'; import {AuthOverlay} from 'component/auth.js';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import batchActions from 'util/batchActions'
import store from 'store.js'; import store from 'store.js';
import { import {
doChangePath, doChangePath,
@ -79,12 +78,10 @@ var init = function() {
window.sessionStorage.setItem('loaded', 'y'); //once we've made it here once per session, we don't need to show splash again window.sessionStorage.setItem('loaded', 'y'); //once we've made it here once per session, we don't need to show splash again
const actions = [] const actions = []
actions.push(doDaemonReady()) app.store.dispatch(doDaemonReady())
actions.push(doChangePath('/discover')) app.store.dispatch(doChangePath('/discover'))
actions.push(doFetchDaemonSettings()) app.store.dispatch(doFetchDaemonSettings())
actions.push(doFileList()) app.store.dispatch(doFileList())
app.store.dispatch(batchActions(actions))
ReactDOM.render(<Provider store={store}><div>{ lbryio.enabled ? <AuthOverlay/> : '' }<App /><SnackBar /></div></Provider>, canvas) ReactDOM.render(<Provider store={store}><div>{ lbryio.enabled ? <AuthOverlay/> : '' }<App /><SnackBar /></div></Provider>, canvas)
} }