redux-devtools/examples/counter/containers/App.js

21 lines
596 B
JavaScript
Raw Normal View History

2015-07-14 22:46:44 +03:00
import React, { Component } from 'react';
import CounterApp from './CounterApp';
import { createStore, applyMiddleware, combineReducers } from 'redux';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import * as reducers from '../reducers';
const createStoreWithMiddleware = applyMiddleware(thunk)(createStore);
const reducer = combineReducers(reducers);
const store = createStoreWithMiddleware(reducer);
export default class App extends Component {
render() {
return (
<Provider store={store}>
{() => <CounterApp />}
</Provider>
);
}
}