This hook encapsulates ephemeral state communication for a specific doc
handle. It tracks caller-provided local state and broadcasts that state to
all peers. It sends periodic heartbeats when there are no state updates.
It also tracks ephemeral state broadcast by peers and forces a re-render when
the state of a peer changes.
It cleans up (stops sending heartbeats and processing ephemeral messages)
when it unmounts.
This hook encapsulates ephemeral state communication for a specific doc handle. It tracks caller-provided local state and broadcasts that state to all peers. It sends periodic heartbeats when there are no state updates.
It also tracks ephemeral state broadcast by peers and forces a re-render when the state of a peer changes.
It cleans up (stops sending heartbeats and processing ephemeral messages) when it unmounts.
It is implemented using Presence.