News for hackers. Stuff that matters.
Re:Data fetching on the web still sucks by AgentME on Wednesday January 27, 2021 @01:07PM (#25931562)
I've been disappointed at how SWR and react-query seem to only support the bare minimum for mutations. As far as I can tell, they don't offer any kind of protection from refreshes overwriting any local mutations that haven't been saved to the server yet. They don't do any handling around updating the data on the server, so you need to handle issues yourself like retrying, deciding when to send to the server, and making sure you never have overlapping update requests racing each other. I've had trouble finding any library in the React or general JS ecosystem that handles this stuff.

There are no comments on this comment yet.