DEV Community

Discussion on: Methods to Fetch in React

Collapse
 
shriji profile image
Shriji

What happened to the good old fetch?

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

People overcomplicating projects with libs like RQ is sad, a normal fetch with useEffect is fine.

Collapse
 
sgolovine profile image
Sunny Golovine

I disagree, libraries like React Query accomplish very specific tasks. I found that RQ works best when you have an app with "Feeds" or other lists that pull down from API's, RQ can effectively handle things like loading, infinite loading, pagination, etc. All these things are an absolute PIA to implement with regular fetch or axios.

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

I didn't say don't use it for this type of tasks, I agree with you and I use it myself for all projects. The problem is people started to create queries with RQ for small things that can be done locally inside a useEffect

Collapse
 
heisenbuggs profile image
Prasuk Jain

I have included that in the very first point itself.

Collapse
 
shriji profile image
Shriji

I have made a simple fetch with useEffect the boilerplate also uses vite also it is hosted as a CF worker