Skip to content

Conversation

@zxcodes
Copy link

@zxcodes zxcodes commented May 19, 2025

This PR adds an enabled prop to the useWebSocket hook, allowing conditional WebSocket connection control. When enabled is false, the connection is not established. This prevents unnecessary socket connections and avoids violating the React rules of hooks, which don't allow calling hooks conditionally.

@zxcodes zxcodes changed the title feat: add enabled prop. feat: Add enabled prop to useWebSocket hook for conditional connection control. May 19, 2025
@zxcodes
Copy link
Author

zxcodes commented Sep 8, 2025

Hello! Just wanted to know if any blockers are preventing this from being merged! @threepointone @third774

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

Successfully merging this pull request may close these issues.

1 participant