Performance - Avoiding Heavy Computation

Learn how the performance can be optimized by avoiding heavy computation.

The list passed to the List component is the same, but the onRemoveItem callback handler isn’t. If the App component re-renders, it always creates a new version of this callback handler. Earlier, we used React’s useCallback Hook to prevent this behavior, by creating a function only on a re-render (if one of its dependencies has changed).

Get hands-on with 1200+ tech skills courses.