{"library":"zustand-middleware-yjs","type":"library","category":null,"description":"zustand-middleware-yjs is a Zustand middleware that enables real-time collaborative state synchronization for any Zustand store using Yjs. This library, currently at stable version 1.3.1 (last updated June 2023), transforms a standard Zustand store into a Conflict-free Replicated Data Type (CRDT), ensuring state consistency across multiple peers. Its key differentiator is its ability to wrap an existing Zustand store creator, making any store collaborative without requiring special hooks or structures for shared types, in contrast to libraries like `zustand-yjs`. It integrates seamlessly with vanilla Zustand and can be composed with other Zustand middleware such as Immer or Redux, broadening its applicability across various React and non-React environments where Zustand is used. The package ships with TypeScript types, but its development appears to be in maintenance mode as of mid-2026.","language":"javascript","status":"maintenance","version":"1.3.1","tags":["javascript","yjs","zustand","state-management","middleware","peer-to-peer","p2p","distributed","local-first","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install zustand-middleware-yjs","imports":["import create from 'zustand'","import * as Y from 'yjs'","import yjs from 'zustand-middleware-yjs'"]},{"cmd":"yarn add zustand-middleware-yjs","imports":[]},{"cmd":"pnpm add zustand-middleware-yjs","imports":[]}],"homepage":null,"github":"https://github.com/joebobmiles/zustand-middleware-yjs","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/zustand-middleware-yjs","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/zustand-middleware-yjs/compatibility"}}