Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Nov 8, 2023
1 parent db040e9 commit a5a5e29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ When they got inserted into `doc`, we gave them a name. For instance, `text0` wa
This is how a remote document will retrieve the root types of the document, after applying the received updates:

```py
from pycrdt import Doc, Text, Array, Map
update = doc.get_update()

# the (binary) update could travel on the wire to a remote machine

remote_doc = Doc()
remote_doc.apply_update(updates)
remote_doc.apply_update(update)

text0 = Text()
array0 = Array()
Expand Down

0 comments on commit a5a5e29

Please sign in to comment.