All the examples are fetching data from a server, and in such cases I think tanstack query already does all the hard part. I feel like people under-use react query and put too much state in their FE. This might be relevant if your app has some really complicated interactions, but for most apps they should really be a function of server, not client, state. Of course this exact reasoning is why I moved off react altogether and now use htmx in most of my projects
It's not just react query, you can make a quick useFetch and useMutation hooks (or claude can), it's not that complex. If you don't need more advanced features (eg caching), you can easily cut down on 3rd party dependencies.
I'm doing no such thing. I'm alerting you to the fact that the owner of the well where you've been drinking has warned that it's not potable and suggested drinking the pure, filtered water instead.
Did you even read the article I linked? If not, please do. If you did read it, and still believe it makes no difference, I can't do anything more to help and will simply wish you good luck and have a nice day.
It wasn't the owner that suggested it. It was some random blogplost that insisted the normal town well that everyone used was no good and you have to use his super special well instead. He points to an incident 6 months ago where someone got drunk and decided to jump into the well. The dude who jumped into the well didn't even say it was the well's fault.
I did read the article linked. I am remain unconvinced. Use effect for data fetching is not "risky", "fragile", and does not cause "subtle, hard to debug problems". This is baseless fear mongering. Claiming Tanstack is the "right" way is incredibly arrogant.