# Don't Overreact! Introducing Apollo Client's new @nonreactive directive and useFragment hook

DevFeed: [Don't Overreact! Introducing Apollo Client's new @nonreactive directive and useFragment hook](<https://devfeed.tech/articles/don-t-overreact-introducing-apollo-client-s-new-nonreactive-directive-and-usefragment-hook-23405.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/introducing-apollo-clients-nonreactive-directive-and-usefragment-hook>)

Author: Alessia Bellisario

Published: 2023-06-15T08:53:00Z

Content type: article

Language: en

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

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [React](<https://devfeed.tech/topics/react.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [cache](<https://devfeed.tech/tags/cache.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [lag](<https://devfeed.tech/tags/lag.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [performance](<https://devfeed.tech/tags/performance.md>), [react](<https://devfeed.tech/tags/react.md>), [render](<https://devfeed.tech/tags/render.md>), [rendering](<https://devfeed.tech/tags/rendering.md>), [skip](<https://devfeed.tech/tags/skip.md>)

## AI overview

Apollo Client 3.8 beta introduces `@nonreactive` to mark query fields or fragments whose cache changes should not trigger a re-render, and `useFragment` to provide a live cache binding that broadcasts fragment results to individual components. In a list rendered from a watched query, updating one user can re-render the parent and all child rows, including unchanged ones. The excerpt presents the new techniques as ways to let child components update without re-rendering the parent, individually or together. It also cautions that `memo` has a prop-comparison cost and cites frequent renders with unchanged props and expensive rendering as criteria for considering that optimization.

## Source excerpt

Efficient React apps are selective in their re-rendering, using a variety of techniques (such as ) to skip re-rendering unchanged components. With the beta release of Apollo Client 3.8, we're excited to spotlight a couple of new techniques to help you re-render exactly the components that you need to: - The directive: mark GraphQL query fields and fragments that shouldn't trigger a re-render if their cached value changes.