useWebSocket hook for @mantine/hooks #8916
Talhaahmed74
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Proposal:
useWebSockethook for@mantine/hooksHi! I've been going through the hooks package and noticed there's currently no built-in hook for WebSocket connections. I'd like to propose adding a
useWebSockethook and contribute the implementation if the maintainers are open to it.What it would cover
Basic API sketch
Why it fits
@mantine/hooksMantine's hooks package already covers browser APIs like
useClipboard,useNetwork, anduseMediaQuery. WebSockets are a common real-time need and a natural extension of this pattern — it keeps developers from reaching for a separate library for something this foundational.Before I start
I wanted to check a few things first:
@mantine/hooks, or do you prefer users handle WebSocket logic externally?Happy to open a draft PR once there's a green light. Thanks!
All reactions