# React Data Fetching Patterns

DevFeed: [React Data Fetching Patterns](<https://devfeed.tech/articles/react-data-fetching-patterns-18957.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/react-data-fetching-patterns/>)

Author: Robin Wieruch

Published: 2024-12-02T05:50:46Z

Content type: article

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [client](<https://devfeed.tech/tags/client.md>), [components](<https://devfeed.tech/tags/components.md>), [data](<https://devfeed.tech/tags/data.md>), [experience](<https://devfeed.tech/tags/experience.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [fetching](<https://devfeed.tech/tags/fetching.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [join](<https://devfeed.tech/tags/join.md>), [library](<https://devfeed.tech/tags/library.md>), [loading](<https://devfeed.tech/tags/loading.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [pattern](<https://devfeed.tech/tags/pattern.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [query](<https://devfeed.tech/tags/query.md>), [react](<https://devfeed.tech/tags/react.md>), [react-data-fetching-patterns](<https://devfeed.tech/tags/react-data-fetching-patterns.md>), [react-query](<https://devfeed.tech/tags/react-query.md>), [refactor](<https://devfeed.tech/tags/refactor.md>), [server](<https://devfeed.tech/tags/server.md>)

## AI overview

The excerpt distinguishes accidental waterfall requests from intentional sequential fetching. When a later request depends on an earlier result, sequential fetching may be necessary; when the required data is already known, the requests can be refactored to run in parallel. The excerpt describes React Server Components as one way to fetch on the server and notes that a client-side library such as React Query typically handles loading, error, and data states with an early return because rendering cannot be paused. For intentional sequences, it suggests weighing user experience against combining requests into one API call, for example through a database join; it notes this can be done with REST as well as GraphQL. The article presents common patterns and says it is not comprehensive. The excerpt cuts off before explaining the parallel-fetching refactor.

## Source excerpt

Data fetching patterns for React components across Client and Server Components ...