2 Replies
fascinating-indigo•2y ago
line 18, newTodo needs a type!
fascinating-indigo•2y ago
made this into a tweet: https://twitter.com/TkDodo/status/1748670478175096893
Dominik 🔮 (@TkDodo) on X
🔮 Mutations tip: When working with them in TypeScript, always make sure that your mutationFn is well typed. Especially if you use an inline function, you get an error if you don't type the input.
TypeScript infers the type from the mutationFn, not from what you pass to mutate!

Twitter