> A WebSocket provider for Y.js that works with ActionCable
npm install @y-rb/actioncable> A WebSocket provider for Y.js that works with ActionCable
With npm:
``bash`
npm install @y-rb/actioncable
With yarn:
`bash`
yarn add @y-rb/actioncable --save
`typescript
import {Doc} from "yjs";
import {WebsocketProvider} from "@y-rb/actioncable";
import {createConsumer} from "@rails/actioncable";
const document = new Doc();
const consumer = createConsumer();
const provider = new WebsocketProvider(
document,
consumer,
"SyncChannel",
{path: "issues/1"}
);
``