Back to Home
React Architecture April 24, 2026 5 min read

Why I Stopped Using useEffect for Data Fetching

Moving from lifecycle-based fetching to Suspense and Server Components simplified state management and eliminated race conditions in my latest project.

When I first started building React applications, useEffect was my go-to tool for almost everything. Need to fetch data? useEffect. Need to subscribe to an event? useEffect. Need to sync state? useEffect. But as my applications grew in complexity, so did the problems caused by this over-reliance on lifecycle hooks. Race conditions, memory leaks, and infinite loops became regular occurrences. Moving to Server Components and Suspense fundamentally changed how I architect data flow. By fetching at the server level, we eliminate the waterfall effect and client-side race conditions. The mental model shifts from 'when this mounts, fetch this' to 'this component needs this data to render'. It's a subtle distinction but one that leads to significantly more robust and predictable applications.

This architectural pivot wasn't without its challenges. Initially, the team struggled with the mental model shift required. When you're used to imperative data fetching—manually tracking loading states, errors, and responses—the declarative nature of the new paradigm feels foreign. It's almost too simple, leading to the question: "Where did all the code go?"

The Realization Phase

However, once we started scaling the application, the benefits became undeniable. The amount of boilerplate code we could delete was staggering. More importantly, we were no longer fighting the framework to manage state synchronization across disjointed components. The data lived where it belonged, and the UI simply reacted to its presence.

In conclusion, while the initial learning curve might seem steep, especially for developers deeply entrenched in legacy patterns, the long-term maintainability and performance gains are well worth the investment. It's not just a new feature; it's a better way to build.