A React Hook-based npm package for seamlessly integrating Yjs in drawing apps, enabling real-time, collaborative drawing experiences.
pnpm install @tldraw/[email protected] tldraw-store
import { Tldraw } from "@tldraw/tldraw";
import { useYjsStore } from "tldraw-store";
// your component
const store = useYjsStore({
roomId: "roomUUID",
hostUrl: "ws:https://localhost:1234", // replace to your own service
});
<Tldraw store={store} />
MIT @ Openflat