We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
useWebSocket
socketUrl
复现地址:https://codesandbox.io/s/empty-initial-socketurl-z2uwvm?file=/App.tsx
预期:当初始socketUrl为空值时不执行connect
connect
复现地址:https://codesandbox.io/s/update-socketurl-d1jjww?file=/App.tsx
复现步骤:等待连接成功后点击update
update
预期:更新socketUrl后重新建立连接并不会触发reconnect
The text was updated successfully, but these errors were encountered:
相关issue:#1523
Sorry, something went wrong.
fix useWebSocket error (#2176) (#2177)
52bc820
* fix: useWebSocket don't call connect when socketUrl is empty (#2176) * fix: useWebSocket unlimited reconnect when update socketUrl (#2176) * fix: disconnect not works * docs: modify useWebSocket docs
Successfully merging a pull request may close this issue.
问题1:
useWebSocket
参数socketUrl
初始值为空报错复现地址:https://codesandbox.io/s/empty-initial-socketurl-z2uwvm?file=/App.tsx
预期:当初始
socketUrl
为空值时不执行connect
问题2:
useWebSocket
更新socketUrl
导致无限重连复现地址:https://codesandbox.io/s/update-socketurl-d1jjww?file=/App.tsx
复现步骤:等待连接成功后点击
update
预期:更新socketUrl后重新建立连接并不会触发reconnect
The text was updated successfully, but these errors were encountered: