-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
executable file
·38 lines (31 loc) · 771 Bytes
/
App.js
File metadata and controls
executable file
·38 lines (31 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React from 'react';
import { connect, Provider } from 'react-redux';
import { createStore, applyMiddleware, combineReducers } from 'redux';
import thunkMiddleware from 'redux-thunk';
import CounterRedux from './src/index';
import counterReduxReducer from './src/reducer';
import toggleColorReducer from './src/reducerToggle';
/**
* This is main reducer, its where the reducer combined
*/
const mainReducers = combineReducers({
counterReduxReducer,
toggleColorReducer
});
/**
* create the store
* single JS object that hold our state
*/
const store = createStore(
mainReducers
);
class App extends React.Component {
render() {
return (
<Provider store={store}>
<CounterRedux/>
</Provider>
);
}
}
export default App;