Created
July 2, 2018 16:52
-
-
Save netoisc/ebf914047bd9cf8288b772a9acfc7776 to your computer and use it in GitHub Desktop.
Create a simple react js bootstrap to use redux & redux-form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // index.js | |
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { createStore, combineReducers } from 'redux'; | |
| import { Provider } from 'react-redux'; | |
| import { reducer as formReducer } from 'redux-form'; | |
| import App from './App'; | |
| import registerServiceWorker from './registerServiceWorker'; | |
| const rootReducer = combineReducers({ | |
| form: formReducer | |
| }); | |
| const store = createStore(rootReducer); | |
| ReactDOM.render( | |
| <Provider store={store}> | |
| <App /> | |
| </Provider> | |
| ,document.getElementById('root')); | |
| registerServiceWorker(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment