replicache
replicache copied to clipboard
User request: sample of more complex mutation validation
See original request here: https://github.com/rocicorp/replicache-todo/issues/2.
This could make sense in Replidraw, for example, some upper limit on number of objects on page or something?
Not exactly "validation", but this new createTodo
mutator ensures that there are not duplicate sort
fields by assigning the next highest value from all current values:
https://github.com/rocicorp/replicache-todo/blob/main/frontend/todo.ts#L44