# Optimizing Data Fetching with Apollo Client: Leveraging useFragment and Colocated Fragments

DevFeed: [Optimizing Data Fetching with Apollo Client: Leveraging useFragment and Colocated Fragments](<https://devfeed.tech/articles/optimizing-data-fetching-with-apollo-client-leveraging-usefragment-and-colocated-fragments-23477.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/optimizing-data-fetching-with-apollo-client-leveraging-usefragment-and-colocated-fragments>)

Author: Tyler Goelz

Published: 2024-05-10T10:50:08Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [client](<https://devfeed.tech/topics/client.md>), [React](<https://devfeed.tech/topics/react.md>), [Caching](<https://devfeed.tech/topics/caching.md>)

Tags: [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [cache](<https://devfeed.tech/tags/cache.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [performance](<https://devfeed.tech/tags/performance.md>), [react](<https://devfeed.tech/tags/react.md>)

## AI overview

This article explains how Apollo Client's useFragment hook and colocated fragments can reduce over-fetching while keeping data requirements close to the components that use them. It discusses separating responsibility for declaring data needs from accountability for fetching data, and notes that useFragment accesses fragment data from Apollo Client's normalized cache.

## Source excerpt

When building complex applications today, Apollo Client users typically reach for to get data to their components. This is no surprise as this is considered a best practice by the Apollo Client documentation. However, this can cause challenges while trying to minimize over-fetching while maintaining a clear separation of concern.