T
TanStack2y ago
itchy-amethyst

handling updates to optimistically rendered items that haven't resolved yet

When a user adds a todo, I optimistically render it. However, it won't have an 'id' until the mutation actually resolves. If the user tries to edit the todo before it has an id, it causes problems. The easy but bad UX solution would be to disable interaction until the mutation resolves. I think it would be better if there was a way to queue the next mutation and have it wait on the first one resolving. I feel like you could do something with useIsFetchching here. Would appreciate some ideas!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?