Emit event with params
mojitoo opened this issue · 1 comments
mojitoo commented
Without Params : Works Great
- Server Side :
server.emit(params[1])
- Client Side :
ws.subscribe(uid)
ws.on(uid, function() {
//Do My stuff
})
With Params : nothing happens
- Server Side :
server.emit(params[1],p)
- Client Side :
ws.subscribe(uid)
ws.on(uid, (p) => {
console.log (p)
//Do My stuff with p
})
Can you help me please. Something wrong with my code ?
mojitoo commented
i found out that when you emit an event with params the first time, this will not trigger the "on" function on client side. it will only works after a refresh