Optional
Readonly
connectionIf there's a connection error it will be available here.
Readonly
connectionProvides the connection status of the Ably connection.
Readonly
currentlyA state value representing the set of client IDs that are currently typing in the room. It automatically updates based on typing events received from the room.
Optional
Readonly
errorA state value representing the current error state of the hook, this will be an instance of Ably.ErrorInfo or undefined
.
An error can occur during mount when initially fetching the current typing state; this does not mean that further
updates will not be received, and so the hook might recover from this state on its own.
Readonly
keystrokeA shortcut to the Typing.keystroke method.
This will send a typing.started
event to the server.
Events are throttled according to the heartbeatThrottleMs
room option.
If an event has been sent within the interval, this operation is no-op.
Calls to keystroke()
and stop()
are serialized and will always resolve in the correct order.
keystroke()
calls are made in quick succession before the first keystroke()
call has
sent a typing.started
event to the server, followed by one stop()
call, the stop()
call will execute
as soon as the first keystroke()
call completes.
All intermediate keystroke()
calls will be treated as no-ops.keystroke()
or stop()
) will always determine the final state, ensuring operations
resolve to a consistent and correct state.A promise which resolves upon success of the operation and rejects with an Ably.ErrorInfo object upon its failure.
Optional
Readonly
roomIf there's an error with the room it will be available here.
Readonly
roomProvides the status of the room.
Readonly
stopA shortcut to the Typing.stop method.
This will send a typing.stopped
event to the server.
If the user was not currently typing, this operation is no-op.
Calls to keystroke()
and stop()
are serialized and will always resolve in the correct order.
keystroke()
calls are made in quick succession before the first keystroke()
call has
sent a typing.started
event to the server, followed by one stop()
call, the stop()
call will execute
as soon as the first keystroke()
call completes.
All intermediate keystroke()
calls will be treated as no-ops.keystroke()
or stop()
) will always determine the final state, ensuring operations
resolve to a consistent and correct state.A promise which resolves upon success of the operation and rejects with an Ably.ErrorInfo object upon its failure.
Optional
Readonly
typingProvides access to the underlying Typing instance of the room.
Common status variables for chat features. Most hooks in this library implement this interface.