Created
August 18, 2019 04:46
-
-
Save dviramontes/1825a95986b283a4c7cee92886ec7e1e 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
import App from './App'; | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './utils/styles/global-styles.css'; | |
import * as serviceWorker from './services/serviceWorker'; | |
const ws = new WebSocket("ws://0.0.0.0:4000/ws") | |
ws.onopen = () => { | |
// connected | |
console.log('WS OPENED') | |
} | |
ReactDOM.render( | |
<App | |
width={1270} | |
height={690} | |
ws={ws} | |
/>, | |
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: https://bit.ly/CRA-PWA | |
serviceWorker.unregister(); |
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
import App from './App'; | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './utils/styles/global-styles.css'; | |
import * as serviceWorker from './services/serviceWorker'; | |
const ws = new WebSocket("ws://0.0.0.0:4000/ws") | |
ws.onopen = () => { | |
// connected | |
console.log('WS OPENED') | |
} | |
ReactDOM.render( | |
<App | |
width={1270} | |
height={690} | |
ws={ws} | |
/>, | |
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: https://bit.ly/CRA-PWA | |
serviceWorker.unregister(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment