Describe the bug
The writeDelete method for directly changing the sync store silently fails and stops further execution.
To Reproduce
Steps to reproduce the behavior:
- Clone the example project from tanstack DB: https://github.com/TanStack/db/tree/main/examples/react/projects
- Add the following below this line:
console.log("todoCollection size1", todoCollection.size)
todoCollection.utils.writeDelete(deletedTodo.id)
console.log("todoCollection size2", todoCollection.size)
return { refetch: false }
- Follow the README.md file to start the dev server
- Start the server and login as any user
- Add a couple of todos
- Try deleting one
- Notice that it will briefly flicker out (deleted) and then reappear and also notice that the
"todoCollection size2" doesn't get logged to the console meaning the onDelete handlers execution stops at the line with .writeDelete but no errors get shown anywhere
Expected behavior
The todo gets deleted from the store and the execution continues after the writeDelete call.
Desktop (please complete the following information):
- OS: Windows 11
- Browser Brave
- Version 1.83.118