Should You Really Use useMemo in React? Let’s Find Out.

Kevin Van Ryckegem
The Startup
Published in
7 min readJan 23, 2021

--

Some of our developers recently came with the question, when should I use useMemo in React? That is an excellent question. In this article, we will have a scientific approach, define a hypothesis, and test this with real-life benchmarks in React.

Read on to find out what the performance impact of useMemo is.

What is useMemo?

UseMemo is one of the hooks offered by React. This hook allows developers to cache the value of a variable along with a dependency list. If any…

--

--

Kevin Van Ryckegem
The Startup

All about AWS / Web / JavaScript / NodeJS / React / Tech. Software Architect, Team Lead.