Skip to content

Commit c7cf1bc

Browse files
committed
Release 0.3.0
1 parent bc9e820 commit c7cf1bc

File tree

245 files changed

+19688
-4576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+19688
-4576
lines changed

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"editor.formatOnSave": true
3030
},
3131
"[scss]": {
32-
"editor.defaultFormatter": "sibiraj-s.vscode-scss-formatter",
32+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3333
"editor.formatOnSave": true
3434
},
3535
"cSpell.words": [
3636
"shadcn"
37-
]
37+
],
3838
}

README.md

Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,99 @@
11
<div align="center"><a name="readme-top"></a>
22

3-
<h1>ReactTogether</h1>
3+
# React Together
44

5-
A library of synchronized components to add multi-user interaction to your website! No server code required!
5+
With React Together, you can _easily_ add real-time multi-user interaction to any React app.
6+
7+
No backend or net-code required!
68

79
[![NPM version][npm-image]][npm-url]
810
[![NPM downloads][download-image]][download-url]
9-
[![Follow Twitter][twitter-image]][twitter-url]
11+
[![NPM size][size-image]][size-url]
12+
13+
<!-- [![License][license-image]][license-url] -->
14+
15+
[![Join Discord][discord-image]][discord-url]
16+
[![Follow Twitter][twitter-image]][twitter-url]
1017

1118
[Changelog](./react-together/CHANGELOG.md) · [Report Bug][github-issues-url] · [Request Feature][github-issues-url]
1219

1320
![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
1421

1522
[npm-image]: https://img.shields.io/npm/v/react-together.svg
1623
[npm-url]: https://www.npmjs.com/package/react-together
17-
1824
[download-image]: https://img.shields.io/npm/dm/react-together.svg?style=flat-square
19-
[download-url]: https://npmjs.org/package/antd
25+
[download-url]: https://npmjs.org/package/react-together
2026
[twitter-image]: https://img.shields.io/twitter/follow/Multisynq.svg?label=Multisynq
2127
[twitter-url]: https://twitter.com/Multisynq
28+
[size-image]: https://img.shields.io/bundlephobia/minzip/react-together?label=size
29+
[size-url]: https://bundlephobia.com/result?p=react-together
30+
[discord-image]: https://img.shields.io/discord/1219357019212087419?label=Join%20our%20Discord&color=7289da
31+
[discord-url]: https://multisynq.io/discord
2232
[github-issues-url]: https://new-issue.ant.design
2333

34+
<!-- [license-image]: https://img.shields.io/npm/l/react-together.svg
35+
[license-url]: https://github.com/multisynq/react-together/blob/main/LICENSE -->
36+
2437
</div>
2538

26-
## 📦 Install
39+
React Together provides a series of hooks that synchronize state across multiple clients.
40+
This allows to build any component you want, such as real-time chat, live cursors and polls, multiplayer games, etc.
41+
It also provides a series of pre-built components to help you get started.
42+
43+
## 📦 Installation
2744

2845
```bash
2946
npm install react-together
3047
```
3148

3249
## 🔨 Usage
3350

51+
The snippet below shows you how easy it is to create a synchronized counter.
52+
3453
```tsx
35-
import { CheckboxTogether } from 'react-together';
54+
import { useStateTogether } from 'react-together'
55+
56+
export function SynchronizedCounter() {
57+
const [value, setValue] = useStateTogether('counter', false)
3658

37-
export function YourComponent() {
38-
return <CheckboxTogether rtKey='unique-id'/>
59+
return <button onClick={() => setValue((p) => p + 1)}>{value}</button>
3960
}
4061
```
4162

42-
## 🔗 Links
63+
Ready to start using React Together? Check out our [Getting Started](https://react-together.dev/getting-started) guide.
64+
65+
## 🫂 Community
66+
67+
[![Join Discord][discord-image]][discord-url]
68+
69+
Join our active Discord community to get involved with the project, get close support, and share what you're building.
70+
71+
---
72+
73+
[![Follow Twitter][twitter-image]][twitter-url]
74+
75+
Get up to date with the latest news and announcements.
76+
77+
---
78+
79+
<!-- [![Join Discord][discord-image]][discord-url]
80+
[![Follow Twitter][twitter-image]][twitter-url] -->
81+
82+
## 🔗 Useful Links
4383

4484
- [Home page](https://react-together.dev/)
45-
- [Documentation](https://react-together.dev/getting-started)
85+
- [Documentation](https://react-together.dev/docs)
4686
- [Change Log](./react-together/CHANGELOG.md)
4787

88+
## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
89+
90+
Let's build React Together... _together_!!
91+
92+
We warmly invite contributions from everyone. Before you get started, please take a moment to review our [Contributing Guide](https://reacttogether.dev/#/contributing). Feel free to share your ideas through [Pull Requests](https://github.com/multisynq/react-together/pulls) or [GitHub Issues](https://github.com/multisynq/react-together/issues). Enjoy your coding journey! :)
4893

49-
## ⌨️ Development
94+
### ⌨️ Local Development
5095

51-
To run ReactTogether locally, run the following commands:
96+
To run and test React Together locally, run the following commands:
5297

5398
```bash
5499
$ git clone [email protected]:multisynq/react-together.git
@@ -61,9 +106,8 @@ $ npm run playground # This will start the playground
61106

62107
Open your browser and visit http://localhost:5173.
63108

64-
## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
65-
109+
## License
66110

67-
Let's build ReactTogether... *together*!!
111+
Licensed under the Apache License 2.0, Copyright © 2024-present Croquet Labs.
68112

69-
We warmly invite contributions from everyone. Before you get started, please take a moment to review our [Contributing Guide](https://reacttogether.dev/#/contributing). Feel free to share your ideas through [Pull Requests](https://github.com/multisynq/react-together/pulls) or [GitHub Issues](https://github.com/multisynq/react-together/issues). Enjoy your coding journey! :)
113+
See [LICENSE](./LICENSE) for more information.

contributing/TERMS_AND_CONDITIONS.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Contributing to ReactTogether: Terms and Conditions
1+
Contributing to React Together: Terms and Conditions
22
================================================
33

4-
**Important**: submitting any contributions to the ReactTogether project implies your **full acceptance of these terms**,
5-
including the *"ReactTogether Individual Contributor License Agreement"* detailed at the end.
4+
**Important**: submitting any contributions to the React Together project implies your **full acceptance of these terms**,
5+
including the *"React Together Individual Contributor License Agreement"* detailed at the end.
66

77
Who can contribute?
88
-------------------
@@ -16,7 +16,7 @@ of your contribution on the project's website or code, including but not limited
1616
or package names.
1717

1818

19-
How will your relation with the ReactTogether project be?
19+
How will your relation with the React Together project be?
2020
-----------------------------------------------------
2121

2222
Your contributions will have the form of GitHub *pull requests*. Note that contributors do not
@@ -47,69 +47,69 @@ About the code you contribute
4747
About the documentation/articles you contribute
4848
-----------------------------------------------
4949

50-
Note the following only applies to documentation/articles meant to be published at the ReactTogether website.
50+
Note the following only applies to documentation/articles meant to be published at the React Together website.
5151

5252
- All documentation artifacts, including articles, must be written **in correct English**.
5353
- Topic and text structure must be first discussed and agreed upon with the project members.
5454
- Project members may edit and make small changes to your texts --of which you will be informed-- before
5555
publishing them.
56-
- Format and visual styles must adhere to the ReactTogether website standards, of which you will be informed
56+
- Format and visual styles must adhere to the React Together website standards, of which you will be informed
5757
by the project members.
5858

5959

6060

6161
Pay special attention to this
6262
-----------------------------
6363

64-
All ReactTogether software is distributed under the **Apache 2.0** open source license, and your contributions
64+
All React Together software is distributed under the **Apache 2.0** open source license, and your contributions
6565
will be licensed in the same way.
6666

6767
If you work for a company which, by the way or place in which your code was written, by your contract terms
6868
or by the laws in your country, could claim any rights (including but not limited to intellectual or industrial
6969
property) over your contributed code, you will have to send the project members (by email from your
7070
authorised superiors), a statement indicating that your company agrees with the terms
71-
explained in this page, and that it both authorises your contribution to ReactTogether and states that will
71+
explained in this page, and that it both authorises your contribution to React Together and states that will
7272
never claim any kind of rights over it.
7373

7474

7575

76-
ReactTogether Individual Contributor License Agreement
76+
React Together Individual Contributor License Agreement
7777
--------------------------------------------------
7878

79-
This contributor agreement ("Agreement") documents the rights granted by contributors to the ReactTogether Project.
79+
This contributor agreement ("Agreement") documents the rights granted by contributors to the React Together Project.
8080

8181
This is a legally binding document, so please read it carefully before agreeing to it. The Agreement
82-
may cover more than one software project managed by ReactTogether.
82+
may cover more than one software project managed by React Together.
8383

8484
### 1. Definitions
8585

86-
* _"ReactTogether"_ means the "ReactTogether project and members".
87-
* _"You"_ means the individual who submits a Contribution to ReactTogether.
88-
* _"Contribution"_ means any work of authorship that is submitted by you to ReactTogether in which you own
86+
* _"React Together"_ means the "React Together project and members".
87+
* _"You"_ means the individual who submits a Contribution to React Together.
88+
* _"Contribution"_ means any work of authorship that is submitted by you to React Together in which you own
8989
or assert ownership of the Copyright.
9090
* _"Copyright"_ means all rights protecting works of authorship owned or controlled by you,
9191
including copyright, moral and neighboring rights, as appropriate, for the full term of their
9292
existence including any extensions by you.
93-
* _"Material"_ means the work of authorship which is made available by ReactTogether to third parties. When
93+
* _"Material"_ means the work of authorship which is made available by React Together to third parties. When
9494
this Agreement covers more than one software project, the Material means the work of authorship
9595
to which the Contribution was submitted. After you submit the Contribution, it may be included
9696
in the Material.
97-
* _"Submit"_ means any form of electronic, verbal, or written communication sent to ReactTogether or its
97+
* _"Submit"_ means any form of electronic, verbal, or written communication sent to React Together or its
9898
representatives, including but not limited to electronic mailing lists, source code control systems,
99-
and issue tracking systems that are managed by, or on behalf of, ReactTogether for the purpose of discussing
99+
and issue tracking systems that are managed by, or on behalf of, React Together for the purpose of discussing
100100
and improving the Material, but excluding communication that is conspicuously marked or
101101
otherwise designated in writing by you as _"Not a Contribution."
102-
* _"Submission Date"_ means the date on which you submit a Contribution to ReactTogether.
102+
* _"Submission Date"_ means the date on which you submit a Contribution to React Together.
103103
* _"Effective Date"_ means the date you execute this agreement or the date You first submit a
104-
Contribution to ReactTogether, whichever is earlier.
104+
Contribution to React Together, whichever is earlier.
105105

106106
### 2. Grant of Rights
107107

108108
#### 2.1. Copyright License
109109

110110
(a) You retain ownership of the copyright in your Contribution and have the same rights to use or
111111
license the Contribution which you would have had without entering into the agreement.
112-
(b) To the maximum extent permitted by the relevant law, you grant to ReactTogether a perpetual, worldwide,
112+
(b) To the maximum extent permitted by the relevant law, you grant to React Together a perpetual, worldwide,
113113
non-exclusive, transferable, royalty-free, irrevocable license under the copyright covering the
114114
Contribution, with the right to sublicense such rights through multiple tiers of sublicensees, to
115115
reproduce, modify, display, perform and distribute the Contribution as part of the Material; provided
@@ -118,7 +118,7 @@ may cover more than one software project managed by ReactTogether.
118118
#### 2.2 Patent License
119119

120120
For patent claims including, without limitation, method, process, and apparatus claims which you
121-
own, control or have the right to grant, now or in the future, you grant to ReactTogether a perpetual, worldwide,
121+
own, control or have the right to grant, now or in the future, you grant to React Together a perpetual, worldwide,
122122
non-exclusive, transferable, royalty-free, irrevocable patent license, with the right to sublicense these
123123
rights to multiple tiers of sublicensees, to make, have made, use, sell, offer for sale, import and
124124
otherwise transfer the Contribution and the Contribution in combination with the Material (and
@@ -129,22 +129,22 @@ compliance with Section 2.3.
129129

130130
#### 2.3 Outbound License
131131

132-
As a condition on the grant of rights in Sections 2.1 and 2.2, ReactTogether agrees to license the Contribution only
132+
As a condition on the grant of rights in Sections 2.1 and 2.2, React Together agrees to license the Contribution only
133133
under the terms of the MIT License (including any right to adopt any future version of this license if
134134
permitted).
135135

136136

137137
#### 2.4 Moral Rights
138138

139139
If moral rights apply to the Contribution, to the maximum extent permitted by law, you waive and agree not
140-
to assert such moral rights against ReactTogether or its successors in interest, or any of our licensees, either
140+
to assert such moral rights against React Together or its successors in interest, or any of our licensees, either
141141
direct or indirect.
142142

143143

144-
#### 2.5 ReactTogether Rights
144+
#### 2.5 React Together Rights
145145

146-
You acknowledge that ReactTogether is not obligated to use your Contribution as part of the
147-
Material and may decide to include any Contributions ReactTogether considers appropriate.
146+
You acknowledge that React Together is not obligated to use your Contribution as part of the
147+
Material and may decide to include any Contributions React Together considers appropriate.
148148

149149
#### 2.6 Reservation of Rights
150150

@@ -170,15 +170,15 @@ You confirm that:
170170

171171
EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED "AS IS". MORE PARTICULARLY,
172172
ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY,
173-
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO ReactTogether AND BY
174-
ReactTogether TO YOU. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN
173+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO React Together AND BY
174+
React Together TO YOU. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN
175175
DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.
176176

177177

178178

179179
### 5. Consequential Damage Waiver
180180

181-
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU OR ReactTogether BE LIABLE FOR ANY LOSS OF
181+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU OR React Together BE LIABLE FOR ANY LOSS OF
182182
PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY
183183
DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE)
184184
UPON WHICH THE CLAIM IS BASED.
@@ -192,9 +192,9 @@ UPON WHICH THE CLAIM IS BASED.
192192
superseded by the United Nations Convention on Contracts for the International Sale of Goods ("UN
193193
Convention") and the parties intend to avoid the application of the UN Convention to this Agreement
194194
and, thus, exclude the application of the UN Convention in its entirety to this Agreement.
195-
6.2 This Agreement sets out the entire agreement between you and ReactTogether for your Contributions to
196-
ReactTogether and overrides all other agreements or understandings.
197-
6.3 If You or ReactTogether assign the rights or obligations received through this Agreement to a third party,
195+
6.2 This Agreement sets out the entire agreement between you and React Together for your Contributions to
196+
React Together and overrides all other agreements or understandings.
197+
6.3 If You or React Together assign the rights or obligations received through this Agreement to a third party,
198198
as a condition of the assignment, that third party must agree in writing to abide by all the rights and
199199
obligations in the Agreement.
200200
6.4 The failure of either party to require performance by the other party of any provision of this

0 commit comments

Comments
 (0)