useEmitter
Import
import { useEmitter } from "@hyper-fetch/react"
Source
Package
Parameters
useEmitter<EmitterType>(emitter: EmitterType, options: UseEmitterOptionsType)
Parameters
| Name | Type | Description |
|---|---|---|
| emitter | | |
| options | |
Returns
useEmitter
| Name | Type | Description |
|---|---|---|
| connected | | |
| connecting | | |
| emit | | |
| onConnected | | |
| onConnecting | | |
| onDisconnected | | |
| onEmit | | |
| onEmitError | | |
| onError | | |
| onReconnecting | | |
| onReconnectingFailed | | |
| setConnected | | |
| setConnecting | | |
| setData | | |
| setExtra | | |
| setTimestamp | |