- React Enhancement like
<Room/>
,<SocketIOProvider/>
... - Multi Persistence Support.
- Customizable for each side.
- Authentication
npm install @textea/y-socket.io
# or
yarn add @textea/y-socket.io
# or
pnpm install @textea/y-socket.io
import * as Y from 'yjs'
import { createSocketIOProvider } from '@textea/y-socket.io/provider'
const doc = new Y.Doc()
const provider = createSocketIOProvider('ws://localhost:1234', 'my-room', doc)
provider.subscribe(state => state.error, error => {
if (error) {
console.error('socket.io provider error', error)
}
})
View example code with React.js
This project is MIT licensed.