Created
October 17, 2018 04:49
-
-
Save jelorivera08/a6c1bbcb8f9b0e67660425cb5cdc4be6 to your computer and use it in GitHub Desktop.
This file contains 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
// /src/index.js | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
import * as serviceWorker from './serviceWorker'; | |
import configureSocket from './socket'; | |
import { createStore } from 'redux'; | |
import reducer from './reducer'; | |
import { Provider } from 'react-redux'; | |
const store = createStore(reducer); | |
// setup socket connection | |
export const socket = configureSocket(store.dispatch); | |
ReactDOM.render( | |
<Provider store={store}> | |
<App /> | |
</Provider>, | |
document.getElementById('root') | |
); | |
// If you want your app to work offline and load faster, you can change | |
// unregister() to register() below. Note this comes with some pitfalls. | |
// Learn more about service workers: http://bit.ly/CRA-PWA | |
serviceWorker.unregister(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment