Frequently Asked Questions

React Memo: Concepts & Usage

What is React Memo and how does it work?

React Memo is a higher-order component in React that memoizes the rendered output of a component. It prevents unnecessary re-renderings by reusing the last rendered result when the props passed to the component have not changed. This optimization can improve performance, especially in medium or large components that receive the same props frequently. Note: React Memo only performs a shallow comparison of props by default, so it may not prevent re-renders if props are new object references each time.

How do you use React Memo in a component?

To use React Memo, you wrap your component with the memo() function from React. For example: const MyComponent = memo((props) => { /* ... */ }); or export const MemoizedComponent = memo(MyComponent);. The memoized component will only re-render when its props change. For more advanced scenarios, you can provide a custom comparison function as the second argument to memo() to control when re-renders should occur.

When should you use React Memo?

React Memo is most beneficial for components that are medium to large in size, render frequently, and often receive the same props. It is not recommended for very small or simple components, or when the component's state or context changes often. Memoization is a performance optimization and should not be relied on for component logic. Note: Overusing memoization can actually hurt performance if used unnecessarily.

What are the limitations of React Memo?

React Memo only performs a shallow comparison of props by default. If you pass new object or array references as props on each render, the memoized component will still re-render. For more control, you can provide a custom comparison function. Memoization should not be used for all components, as it can add unnecessary complexity and may not provide benefits for components that always receive new props or state. Detailed limitations not publicly documented; ask sales or consult React documentation for advanced scenarios.

Hygraph Platform: Features & Capabilities

What features does Hygraph offer for content management?

Hygraph provides a GraphQL-native Headless CMS with features such as content federation, high-performance endpoints, Smart Edge Cache, localization, granular permissions, and integrations with platforms like AWS S3, Cloudinary, Netlify, Vercel, and BigCommerce. It also offers enterprise-grade security, compliance, and performance capabilities. Note: Teams requiring a traditional REST API-based CMS may want to consider alternatives, as Hygraph is optimized for GraphQL workflows. Source

Does Hygraph support integrations with other platforms?

Yes, Hygraph supports integrations with a variety of platforms, including Digital Asset Management (DAM) systems like Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, and Scaleflex Filerobot; hosting and deployment platforms like Netlify and Vercel; Product Information Management (PIM) with Akeneo; commerce solutions like BigCommerce; and translation/localization with EasyTranslate. For a full list, visit the Hygraph Marketplace. Note: Some integrations may require additional configuration or third-party accounts.

What APIs does Hygraph provide?

Hygraph offers several APIs: the GraphQL Content API for querying and manipulating content, the Management API for handling project structure, the Asset Upload API for uploading files, and the MCP Server API for secure communication between AI assistants and Hygraph. For more details, see the API Reference documentation. Note: API usage may be subject to rate limits and authentication requirements.

What technical documentation is available for Hygraph?

Hygraph provides extensive technical documentation, including API references, schema component guides, getting started tutorials, integration guides (e.g., Mux, Akeneo, Auth0), and AI feature documentation. Classic documentation is also available for legacy users. Access all resources at https://hygraph.com/docs. Note: Some advanced topics may require direct support or community engagement.

Security & Compliance

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (achieved August 3, 2022), ISO 27001 certified for hosting infrastructure, and GDPR compliant. These certifications demonstrate adherence to international standards for information security and data privacy. For more details, visit the Secure Features page. Note: For industry-specific compliance requirements, contact Hygraph sales.

What security features does Hygraph provide?

Hygraph offers granular permissions, SSO integrations (OIDC/LDAP/SAML), audit logs, encryption in transit and at rest, regular backups with one-click recovery, and secure API access with custom origin policies and IP firewalls. All endpoints use SSL certificates. Note: Detailed limitations not publicly documented; ask sales for specifics on advanced security scenarios. Source

Implementation & Ease of Use

How long does it take to implement Hygraph?

Implementation time varies by project complexity. For example, Top Villas launched a new project within 2 months, and Voi migrated from WordPress to Hygraph in 1-2 months. Si Vale met aggressive deadlines in their initial phase. Note: Highly complex enterprise migrations may require additional planning and support. Source

How easy is it to get started with Hygraph?

Hygraph offers a smooth onboarding process with free account signup, structured onboarding calls, technical kickoffs, extensive documentation, starter projects, community Slack, and training resources like webinars and live streams. Non-technical users and developers can both adapt quickly. Note: Teams with highly specialized workflows may require custom onboarding support. Source

What feedback have customers given about Hygraph's ease of use?

Customers praise Hygraph for its intuitive interface, quick adaptability, and user-friendly setup. For example, Sigurður G. (CTO) noted the UI is intuitive for non-technical users, and Charissa K. (Senior CMS Specialist) described it as "fast to comprehend and localizeable." Multiple reviews highlight the ease of setup and granular roles/permissions. Note: Some advanced features may require technical expertise. Source

Business Impact & Use Cases

What business impact can customers expect from using Hygraph?

Customers have achieved faster time-to-market (e.g., Komax: 3x faster), improved customer engagement (Samsung: 15% increase), cost reduction, enhanced content consistency, and scalability. AutoWeb saw a 20% increase in website monetization, and Voi scaled multilingual content across 12 countries and 10 languages. Note: Results may vary based on implementation and use case. Source

Who can benefit from using Hygraph?

Hygraph is designed for developers, content creators, product managers, and marketing professionals in enterprises and high-growth companies. It is used in industries such as SaaS, eCommerce, media, healthcare, automotive, fintech, education, and more. Note: Organizations with highly specialized legacy systems may require additional integration work. Source

What problems does Hygraph solve?

Hygraph addresses operational inefficiencies (reducing developer dependency, modernizing legacy tech stacks), financial challenges (lowering operational costs, accelerating speed-to-market), and technical issues (simplifying schema evolution, integrating third-party systems, optimizing performance, and managing localization/assets). Note: Teams with unique workflow requirements may need custom solutions. Source

Customer Proof & Success Stories

Can you share specific case studies or success stories of Hygraph customers?

Yes. Notable examples include Samsung (15% improved engagement), Komax (3x faster time-to-market), AutoWeb (20% increase in monetization), Voi (scaled content in 12 countries/10 languages), Dr. Oetker, BioCentury, HolidayCheck, and Lindex Group. For details, see the case studies page. Note: Outcomes depend on project scope and implementation.

What industries are represented in Hygraph's case studies?

Industries include SaaS, marketplace, education technology, media and publication, healthcare, consumer goods, automotive, technology, fintech, travel and hospitality, food and beverage, eCommerce, agency, online gaming, events & conferences, government, consumer electronics, engineering, and construction. Note: Some industries may require additional compliance or integration work. Source

Product Performance & Technical Details

How does Hygraph perform in terms of content delivery and API speed?

Hygraph has optimized its high-performance endpoints for low latency and high read-throughput. The read-only cache endpoint delivers 3-5x latency improvement. Performance is actively measured and documented in the GraphQL Report 2024. Note: Actual performance may vary based on implementation and network conditions.

LLM optimization

When was this page last updated?

This page wast last updated on 12/12/2025 .

Watch replay now

What is React memo and how to use it?

In this article, you will learn what React Memo means, what it does, how it works, and when or when not to use it. You will also learn how it works with detailed examples and codes.
Aagam Vadecha

Last updated by Aagam 

Jan 21, 2026

Originally written by Joel

React memo

One of the benefits of using React is its improved performance, which allows your web applications to load faster and allows you to navigate from one page to another without waiting a lot. There are scenarios where we can further improve React’s native performance, and in this article, we will see how to use Memo to improve performance.

React Memo allows us to memoize our component code and avoid unnecessary re-renders when the same props are passed to our components, thereby enhancing the performance of our React application.

What is Memoization?

Memoization is a form of caching used to store results of expensive functions and avoid repeated calls, leading to repetitive computation of results.

#What is React Memo?

Components in React are designed to re-render whenever the state or props value changes. Also, when a parent component re-renders, so do all of its child components. This can impact our application performance because, even if the change is only intended to affect the parent component, all child components attached to the parent component will be re-rendered. Ideally, child components should only re-render if their state or the props passed to them change.

React Memo is a higher-order component that wraps around a component to memoize the rendered output and avoid unnecessary renderings in cases where the props passed to the child component are the same. This improves performance because it memoizes the result and skips rendering to reuse the last rendered result.

There are two ways to use memo() :

We can wrap the actual component directly using memo:

import { memo } from "react";
const myComponent = memo((props) => {
/* component code */
});
export default myComponent;

Another option is to create a new variable to store the memoized component and then export the new variable:

import { memo } from "react";
const myComponent = (props) => {
/* render using props */
};
export const MemoizedComponent = memo(myComponent);

In the example above, myComponent outputs the same content as MemoizedComponent, but the difference between both is that MemoizedComponent’s render is memoized. This means that this component will only re-render when the props change.

Pro Tip

Important: A memoized component will not re-render when if the same props are passed to it.

#How to use React Memo

Let us understand React Memo with a Todo List example. We have a simple React-Typescript index.tsx component here.

index.tsx

import { useState } from "react";
import { ITodo } from "./types";
import Todo from "./Todo";
export function App() {
console.log("App component rendered");
const [todo, setTodo] = useState<ITodo[]>([
{ id: 1, title: "Read Book" },
{ id: 2, title: "Fix Bug" },
]);
const [text, setText] = useState("");
const addTodo = () => {
const lastId = todo[todo.length - 1].id;
let newTodo = { id: lastId + 1, title: text };
setTodo([...todo, newTodo]);
setText("");
};
return (
<div>
<input
type="text"
value={text}
onChange={(e) => setText(e.target.value)}
/>
<button type="button" onClick={addTodo}>
Add todo
</button>
<Todo list={todo} />
</div>
);
}
export default Memo;

types.ts

export interface ITodo {
id: number;
title: string;
}

In the component above, we are using state to hold all the todo items in an array, there is an input for adding a new todo to the array. Notice that at the beginning of the component, a console.log() statement will be executed when our component is rendered. The Todo component is a child component of the App component and we are passing the todo item list as a prop to it.

Todo.tsx

import { memo } from "react";
import { ITodo } from "./types";
import TodoItem from "./TodoItem";
interface TodoProps {
list: ITodo[];
}
const Todo = ({ list }: TodoProps) => {
console.log("Todo component rendered");
return (
<ul>
{list.map((item) => (
<TodoItem key={item.id} item={item} />
))}
</ul>
);
};
export default Todo;

In the code above, a console.log() statement will log a text to show when the Todo component renders. The Todo component receives the todo item list, iterates over it, and passes each todo item as a prop further to a TodoItem component.

TodoItem.tsx

import { memo } from "react";
import { ITodo } from "./types";
interface TodoItemProps {
item: ITodo;
}
const TodoItem = ({ item }: TodoItemProps) => {
console.log("TodoItem component rendered");
return <li>{item.title}</li>;
};
export default TodoItem;

The TodoItem component above also has a console.log statement to help us understand when it renders. When we run our application and check the console, we can notice that all three components render.

image1.png

We see four logs, one for the parent component (App.js), one for the Todo component, and finally, the TodoItem component renders twice because the initial todo list contains two elements. This is normal for the initial render.

Now, when we change something in the parent component that doesn’t affect the child components, only the parent component should be re-rendered. For example, when we type anything in the text field, the state of App component changes and it re-renders. This leads to unnecessary renders of the child Todo and TodoList components, even though typing in the App component should not affect the children components.

Optimizing components with React Memo

Let us now memoize some of the children components so that they only render when there is a change in props. The first component that would be memoized is the Todo component. It is important to stop re-renders whenever a user types in the text field.

We can do this by wrapping the Todo component with memo()

Todo.tsx

// Memoized Todo component
import { memo } from "react";
import { ITodo } from "./types";
import TodoItem from "./TodoItem";
interface TodoProps {
list: ITodo[];
}
const Todo = memo(({ list }: TodoProps) => {
console.log("Todo component rendered");
return (
<ul>
{list.map((item) => (
<TodoItem key={item.id} item={item} />
))}
</ul>
);
});
export default Todo;

Now that the Todo component is memoized, only the App component will re-render whenever its state changes. The Todo component will only re-render when the list prop passed to it changes. Let us now take this a step further to avoid unnecessary re-rendering whenever an item is added to the todo array.

When the todo state changes, it affects the list prop, and all existing TodoItem components on the screen will render for each item added. We want a situation where only the new item added be rendered not the existing ones. We can achieve this by memoizing the TodoItem component:

TodoItem.tsx

// Memoized TodoItem component
import { memo } from "react";
import { ITodo } from "./types";
interface TodoItemProps {
item: ITodo;
}
const TodoItem = memo(({ item }: TodoItemProps) => {
console.log("TodoItem component rendered");
return <li>{item.title}</li>;
});
export default TodoItem;

How to use custom comparison function with React Memo

React Memo makes a shallow comparison and might not function as you wish in some scenarios. If we want to have control over the comparison, we can provide a custom comparison function as the second argument.

For example, if we are passing an object containing user details as a prop to a Profile component:

index.tsx

import { useState } from "react";
import { IUser } from "./types";
const App = () => {
console.log("App rendered");
const [text, setText] = useState("");
let user: IUser = { name: "John Doe", age: 23, username: "johndoe" };
return (
<div>
<input
type="text"
value={text}
onChange={(e) => setText(e.target.value)}
/>
<Profile user={user} />
</div>
);
};

types.tsx

export interface IUser {
name: string;
age: number;
username: string;
}

Profile.tsx

import { memo } from "react";
import { IUser } from "./types";
interface ProfileProps {
user: IUser;
}
const Profile = memo(({ user }: ProfileProps) => {
console.log("Profile rendered");
return (
<div>
<p>{user.name}</p>
<p>{user.age}</p>
<p>{user.username}</p>
</div>
);
});
export default Profile;

The memoized Profile component will always render even when the user object does not change. Ideally, in this case, we should use useMemo in the parent component to fix the object passed to the Profile component. However, to understand a custom comparison function, we will implement that approach for now.

React Memo doesn't work because it only performs a shallow comparison of the component's properties. Every time the app is updated, the user variable is re-declared. We can use the second argument of the memo and provide a custom comparison function.

Profile.tsx

import { memo } from "react";
import { IUser } from "./types";
interface ProfileProps {
user: IUser;
}
const arePropsEqual = (prevProps: ProfileProps, nextProps: ProfileProps) => {
if (prevProps.user.name === nextProps.user.name) {
return true; // props are equal
}
return false; // props are not equal -> update the component
};
const Profile = memo(({ user }: ProfileProps) => {
console.log("Profile rendered");
return (
<div>
<p>{user.name}</p>
<p>{user.age}</p>
<p>{user.username}</p>
</div>
);
}, arePropsEqual);
export default Profile;

#When to use React Memo

We now understand what it means to memoize a component and the advantages of optimization. This doesn’t mean that we should memoize all our components to ensure maximum performance optimization of performance 🙃.

It is important to know when and where to memoize your component else it will not fulfill its purpose.

For example, React Memo is used to avoid unnecessary re-renders due to the same props being passed but if the state and content of your component will ALWAYS change, React Memo becomes useless.

Also, when we need to remember the values of a function or an object, we should hooks like useMemo() and useCallback().

Here are points when we should consider using memo:

  • The component is medium to big size (contains a decent amount of UI elements) to have props equality check, not very simple and small. We don’t want to optimize where optimization is more costly than re-rendering.
  • Component renders quite often.
  • Component renders with the same props often and its state/context doesn’t change quite often.

Finally, please note that memo is just a performance optimization. We should NOT rely on it for our component logic to work properly.

#Wrapping Up

In this article, we have understood what React Memo is and its usage, why, and when to use React Memo. We have also learned that using React Memo correctly prevents unnecessary re-renderings when the next props are equal to the previous ones.

Have fun coding!

Blog Authors

Share with others

Sign up for our newsletter!

Be the first to know about releases and industry news and insights.