mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-15 06:07:30 +03:00
21 lines
596 B
JavaScript
21 lines
596 B
JavaScript
|
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>
|
||
|
);
|
||
|
}
|
||
|
}
|