Rezi
Preparing search index...
core/src
useWebSocket
Function useWebSocket
useWebSocket
<
T
=
string
>
(
ctx
:
WebSocketHookContext
,
url
:
string
,
protocol
?:
string
|
readonly
string
[]
,
options
?:
UseWebSocketOptions
<
T
>
,
)
:
UseWebSocketState
<
T
>
Subscribe to a websocket endpoint with message parsing and auto-reconnect.
Type Parameters
T
=
string
Parameters
ctx
:
WebSocketHookContext
url
:
string
Optional
protocol
:
string
|
readonly
string
[]
options
:
UseWebSocketOptions
<
T
>
= {}
Returns
UseWebSocketState
<
T
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Rezi
Loading...
Subscribe to a websocket endpoint with message parsing and auto-reconnect.