useCallback vs useMemo

Jan Hesters
May 28 · 5 min read
What is the difference between useCallback and useMemo? 🤔


Abstract

Translation

First-class functions

Referential equality

API

useCallback(fn, deps);
useMemo(fn, deps);




Usage

Summary


 by the author.

Jan Hesters

Written by

💻 AWS Amplify 📱JavaScript ⚛️ React -/Native 🔥 B.Sc. Physics 💡Full-Stack Developer / Consultant

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade