Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme.md #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ with modern state management libraries in React. This middleware for Zustand
solves that problem by allowing a Zustand store to be turned into a CRDT, with
the store's state replicated to all peers.

This differs from the other Yjs and Zustand solution, `zustand-yjs` by allowing
This differs from the other Yjs and Zustand solution,
[`zustand-yjs`](https://github.com/tandem-pt/zustand-yjs), by allowing
any Zustand store be turned into a CRDT. This contrasts with `zustand-yjs`'s
solution, which uses a Zustand store to collect shared types and access them
through special hooks.

Because this solution is simply a middleware, it can also work anywhere Zustand
can be used. The vanilla Zustand `create()` function handles middleware exactly
the same as the React version. And not only that, but it can be composed with
other middleware, such as Immer or Redux!
other middleware, such as Redux!
([Immer doesn't work](https://github.com/joebobmiles/zustand-middleware-yjs/issues/53))

## Example

Expand Down Expand Up @@ -80,7 +82,7 @@ render(
if the library is able to support Yjs protocols. This means that, for now,
support for the awareness protocol is not planned.
* This does not mean you cannot use awareness in your projects - see the
sister project [y-react](joebobmiles/y-react) for an example of using
sister project [y-react](https://github.com/joebobmiles/y-react) for an example of using
awareness without the middleware.

# License
Expand All @@ -105,4 +107,4 @@ This library is licensed under the MIT license:
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
> SOFTWARE.