WebSocketAPI - v1.1.5-1 › Globals › "client/onSnapshot"
▸ onSnapshot(api: string, requestHead: any, callback: function): function
Defined in lib/client/onSnapshot.ts:14
Register a new snapshot event to the server. This event will automatically re-register if the connection gets disconnected.
Parameters:
▪ api: string
the api end point to call
▪ requestHead: any
any information to send to server. This info gets used when matching the snapshot type. So don't use a large payload here
▪ callback: function
the callback to run the the snapshot data
▸ (snapshot: SnapshotResponse): void
Parameters:
| Name | Type |
|---|---|
snapshot |
SnapshotResponse |
Returns: function
▸ (): void