|
|
|
|
|
by pavlov
930 days ago
|
|
> “Also, memo() compares individual prop values, while useMemo() can only look at the whole props object” Passing “Object.values(childProps)” as the dependency array for useMemo should do the same thing. But yeah, there are good reasons to use React.memo for convenience with props. It’s not fundamentally different though, and you can definitely useMemo() for caching components when more convenient. |
|