Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Jun 8, 2023
1 parent d0ff78d commit de7d8c4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ from ypy_websocket import WebsocketProvider

async def client():
ydoc = Y.YDoc()
async with connect("ws://localhost:1234/my-roomname") as websocket:
WebsocketProvider(ydoc, websocket)
async with connect("ws://localhost:1234/my-roomname") as websocket, WebsocketProvider(ydoc, websocket):
ymap = ydoc.get_map("map")
with ydoc.begin_transaction() as t:
ymap.set(t, "key", "value")
Expand Down

0 comments on commit de7d8c4

Please sign in to comment.