Added Redux support
This commit is contained in:
@@ -25,12 +25,27 @@
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { createStore, applyMiddleware } from 'redux';
|
||||
import { Provider } from 'react-redux';
|
||||
import RootReducer from './reducers/RootReducer'
|
||||
|
||||
import App from './App';
|
||||
|
||||
//Import Stylesheet
|
||||
import Styles from './styles/index';
|
||||
|
||||
//Import Base Component
|
||||
import App from './App';
|
||||
|
||||
//Create our redux middleware
|
||||
const store = createStore(RootReducer);
|
||||
const unsubscribe = store.subscribe(() => {
|
||||
console.log(store.getState());
|
||||
});
|
||||
|
||||
ReactDOM.render(
|
||||
<App />,
|
||||
(
|
||||
<Provider store={store}>
|
||||
<App />
|
||||
</Provider>
|
||||
),
|
||||
document.getElementById('app')
|
||||
);
|
||||
|
Reference in New Issue
Block a user