Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextjs 中 useWebSocket options的on事件都不生效 #2309

Open
asndsa opened this issue Sep 1, 2023 · 1 comment
Open

nextjs 中 useWebSocket options的on事件都不生效 #2309

asndsa opened this issue Sep 1, 2023 · 1 comment

Comments

@asndsa
Copy link

asndsa commented Sep 1, 2023

"ahooks": "^3.7.5",
"next": "13.1.6",
BUG
在nextjs 中通过useWebSocket的options中使用onOpen, onMessage,onClose,onError,皆不生效;

临时解决方案:
使用useWebSocket 返回的 webSocketIns 通过 addEventListener 监听 'open', 'message', 'error','close',可以正常使用

@liuyib
Copy link
Collaborator

liuyib commented Sep 13, 2023

有空我验证下~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants