Last active
January 16, 2019 17:18
-
-
Save nomoney4me/6f540398b0c6ac6cd9f9fc56ffd3b05c to your computer and use it in GitHub Desktop.
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
| 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