aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/App.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/App.js b/vnext/src/App.js
index 5397a4b7..5726c511 100644
--- a/vnext/src/App.js
+++ b/vnext/src/App.js
@@ -44,7 +44,7 @@ export default class App extends React.Component {
this.es.onopen = () => {
console.log('online');
};
- this.es.onmessage = (msg) => {
+ this.es.addEventListener('msg', msg => {
try {
var jsonMsg = JSON.parse(msg.data);
console.log('data: ' + msg.data);
@@ -66,7 +66,7 @@ export default class App extends React.Component {
} catch (err) {
console.log(err);
}
- };
+ });
}
componentDidMount() {