重新加载时,需要进行更改以取消订阅和订阅Redis频道

时间:2018-12-24 07:19:13

标签: node.js reactjs redis socket.io

用户enter image description here登录用户已订阅Redis频道

然后,当发行人单击提交服务时,它发出this.context.socket.emit("userServiceNotification", notify); 那么服务器正在监听,并且在userServicenotificaion enter image description here中发布消息变红 Redis客户端收到消息并发送给用户enter image description here 在nav.jsx中,我正在侦听套接字消息enter image description here,我可以正确地接收通知,但是当我重新加载套接字ID时,所以我无法收到通知,因此请无论我在何处重新加载都可以帮助我订阅新的套接字ID或刷新以获取通知。我是新手,如果您发现任何错误,请随时原谅我,

0 个答案:

没有答案
相关问题