A library to seamlessly add real-time multi-user interaction to your React app!
npm install react-togetherWith React Together, you can _easily_ add real-time multi-user interaction to any React app.
No backend or net-code required!
[![NPM version][npm-image]][npm-url]
[![NPM downloads][download-image]][download-url]
[![NPM size][size-image]][size-url]
[![Join Discord][discord-image]][discord-url]
[![Follow Twitter][twitter-image]][twitter-url]
Changelog · [Report Bug][github-issues-url] · [Request Feature][github-issues-url]

[npm-image]: https://img.shields.io/npm/v/react-together.svg
[npm-url]: https://www.npmjs.com/package/react-together
[download-image]: https://img.shields.io/npm/dm/react-together.svg?style=flat-square
[download-url]: https://npmjs.org/package/react-together
[twitter-image]: https://img.shields.io/twitter/follow/Multisynq.svg?label=Multisynq
[twitter-url]: https://twitter.com/Multisynq
[size-image]: https://img.shields.io/bundlephobia/minzip/react-together?label=size
[size-url]: https://bundlephobia.com/result?p=react-together
[discord-image]: https://img.shields.io/discord/1219357019212087419?label=Join%20our%20Discord&color=7289da
[discord-url]: https://multisynq.io/discord
[github-issues-url]: https://new-issue.ant.design
React Together provides a series of hooks that synchronize state across multiple clients.
This allows to build any component you want, such as real-time chat, live cursors and polls, multiplayer games, etc.
It also provides a series of pre-built components to help you get started.
``bash`
npm install react-together
The snippet below shows you how easy it is to create a synchronized counter.
`tsx
import { useStateTogether } from 'react-together'
export function SynchronizedCounter() {
const [value, setValue] = useStateTogether('counter', false)
return
}
`
Ready to start using React Together? Check out our Getting Started guide.
[![Join Discord][discord-image]][discord-url]
Join our active Discord community to get involved with the project, get close support, and share what you're building.
---
[![Follow Twitter][twitter-image]][twitter-url]
Get up to date with the latest news and announcements.
---
- Home page
- Documentation
- Change Log
Let's build React Together... _together_!!
We warmly invite contributions from everyone. Before you get started, please take a moment to review our Contributing Guide. Feel free to share your ideas through Pull Requests or GitHub Issues. Enjoy your coding journey! :)
To run and test React Together locally, run the following commands:
`bash``
$ git clone git@github.com:multisynq/react-together.git
$ cd react-together
$ npm install
$ npm run build
$ npm run website # This will start the website
$ npm run playground # This will start the playground
Open your browser and visit http://localhost:5173.
Licensed under the Apache License 2.0, Copyright © 2024-present Croquet Labs.
See LICENSE for more information.