socketio fixed
This commit is contained in:
@ -1,6 +1,4 @@
|
||||
'use strict';
|
||||
//import io from('/socket.io/socket.io.js');
|
||||
let io = require('socket.io-client')
|
||||
let iosocket = io.connect();
|
||||
|
||||
// setup all my handlers
|
||||
@ -8,6 +6,11 @@ iosocket.on('clientrefresh', () => {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
iosocket.on('stateChange', () => {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
|
||||
// get my state
|
||||
let context = 'main';
|
||||
iosocket.emit('loadState',context);
|
||||
|
Reference in New Issue
Block a user