Yeah, folks are getting from something that state setting in a useEffect is bad, period. So I end up getting even when it's something like this. I certainly agree sync setting is bad, but data loading like this is fine, IMHO. RQ is certainly nicer, but not required.
Comments
It's more buttery smooth to find clever moments to prefetch and only use React once you have the data you need.
https://tkdodo.eu/blog/why-you-want-react-query
In demo(prototype) use useEffect to fetch data is more than fine.
But you can’t blame a lot of people for thinking this *is* inside the effect since the code is between the brackets haha.
We should do better helping people understand the fundamentals.