Skip to content

Instantly share code, notes, and snippets.

@jpwesselink
Last active June 9, 2017 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpwesselink/7e02582d8bee0679dcd3c40cd14c9552 to your computer and use it in GitHub Desktop.
Save jpwesselink/7e02582d8bee0679dcd3c40cd14c9552 to your computer and use it in GitHub Desktop.
Some description
// ./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