Check if the user is connected to a React Together session. Perfect for conditional rendering and connection-aware features.
useIsTogether
returns true
when the user is currently connected to a React Together session, and false
otherwise. This hook is essential for building connection-aware interfaces that adapt based on whether users are in a collaborative session.
true
if the user is connected to a React Together session, false
otherwiseuseIsSynchronized
- Check synchronization statususeConnectedUsers
- Get connected users when session is activeuseCreateRandomSession
- Create new sessionsuseLeaveSession
- Leave current sessionuseIsTogether
is fully typed and returns a boolean value:
useIsTogether
is an alias for useIsJoined
from @multisynq/react
. It returns true
when the user has successfully joined a session and the connection is active.