Last active
June 9, 2017 13:10
-
-
Save jpwesselink/7e02582d8bee0679dcd3c40cd14c9552 to your computer and use it in GitHub Desktop.
Some description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./main.js | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { createStore, combineReducers } from 'redux'; | |
import { | |
Container as Counter, | |
reducers as counterReducers | |
} from './CounterApp'; | |
import { | |
Container as FlipFlop, | |
reducers as flipFlopReducers | |
} from './FlipFlopApp'; | |
const store = createStore( | |
combineReducers({ ...counterReducers, ...flipFlopReducers }) | |
); | |
/* | |
Our store will look like this: | |
{ | |
counter: 0, | |
flipFlop: true | |
} | |
*/ | |
render( | |
<Provider store={store}> | |
<div> | |
<Counter /> | |
<FlipFlop /> | |
</div> | |
</Provider>, | |
document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment