Stop Using useEffect for Fetching in React 🚫 Do This Instead

Published: 23 September 2025
on channel: Coding Jitsu
3,173
99

Most developers still use useEffect + useState for data fetching in React. That works… but it’s messy, repetitive, and misses out on caching and background updates.
In this short, I’ll show you:

The old way with useEffect and a status state
A custom hook to reuse the logic
TanStack Query (React Query) for caching, retries, and background updates
SWR for a lightweight solution

⚡ Which approach do you prefer? Let me know in the comments!


On this page of the site you can watch the video online Stop Using useEffect for Fetching in React 🚫 Do This Instead with a duration of hours minute second in good quality, which was uploaded by the user Coding Jitsu 23 September 2025, share the link with friends and acquaintances, this video has already been watched 3,173 times on youtube and it was liked by 99 viewers. Enjoy your viewing!