React Hooks Tutorial - 25 - useMemo

Опубликовано: 14 Октябрь 2024
на канале: Edubaba
87
6

The React useMemo Hook returns a memoized value.
Think of memoization as caching a value so that it does not need to be recalculated.
The useMemo Hook only runs when one of its dependencies update.
This can improve performance.

The useMemo and useCallback Hooks are similar. The main difference is that useMemo returns a memoized value and useCallback returns a memoized function.