|
|
|
|
|
by bfrydl
2455 days ago
|
|
> Isn't this missing the point? It's not about the overhead of declaring a new function, it's that you've made one of the props change on every render, so your child element needs to run its render function every time. This is the larger issue, but the `useCallback` hook can be used to memoize anonymous render functions based on given values to avoid this problem. |
|