The main context provider component that enables real-time collaboration features in your React application.
ReactTogether
is the core context provider component that wraps your entire application (or specific parts) to enable real-time collaboration features. It establishes the connection to the Multisynq infrastructure and provides the context needed for all React Together hooks and components to function.
ReactTogether
component.rtName
- Session namertPwd
- Session passwordhttps://myapp.com/?rtName=team-session&rtPwd=secure123
When these parameters are present in the URL, they override the sessionParams.name
and sessionParams.password
props.
sessionIgnoresUrl={true}
to allow sessions with the same name to be shared across different URLs.
userId
is provided, React Together generates a random IDrememberUsers={true}
, user IDs are stored in localStorage for consistencyderiveNickname
function converts user IDs into display names:
SessionManager
- UI for managing sessionsChat
- Ready-to-use chat componentConnectedUsers
- Display connected usersuseIsTogether
- Check connection statususeConnectedUsers
- Get connected usersuseStateTogether
- Shared state management