Give it a shot at https://learn.yjs.dev/lessons/03-todo-list/!
Give it a shot at https://learn.yjs.dev/lessons/03-todo-list/!
We can give each todo an index property. The ordered list of todos is an array of the map values sorted by the index property. To move a todo, simply set a new index!
It sounds good in theory, but…
We can give each todo an index property. The ordered list of todos is an array of the map values sorted by the index property. To move a todo, simply set a new index!
It sounds good in theory, but…
That means moving array elements really means deleting and re-adding them.
That means moving array elements really means deleting and re-adding them.
Give it a shot at https://learn.yjs.dev/lessons/02-counter/!
Give it a shot at https://learn.yjs.dev/lessons/02-counter/!
When we add a little latency, the counter breaks!
When we add a little latency, the counter breaks!
Give it a shot at https://learn.yjs.dev/lessons/01-introduction/!
Give it a shot at https://learn.yjs.dev/lessons/01-introduction/!
Here you can see how Yjs syncs the values between two maps, with latency added to simulate a network connection.
Here you can see how Yjs syncs the values between two maps, with latency added to simulate a network connection.
All in all, there are six shared types:
All in all, there are six shared types: