Skip to content

Instantly share code, notes, and snippets.

@nomoney4me
Last active January 16, 2019 17:18
Show Gist options
  • Select an option

  • Save nomoney4me/6f540398b0c6ac6cd9f9fc56ffd3b05c to your computer and use it in GitHub Desktop.

Select an option

Save nomoney4me/6f540398b0c6ac6cd9f9fc56ffd3b05c to your computer and use it in GitHub Desktop.
class App extends React.Component {
constructor(props) {
super(props)
}
componentDidMount() {
let es = new EventSource('/stream')
es.onmessage = e => {
console.log(e.data)
}
}
render() {
return <div>testing</div>
}
}
// error: The connection to http://localhost:3000/stream was interrupted while the page was loading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment