easyReact Native#19

Memoize callbacks with useCallback

Prompt

Create a list of items where each item has a "delete" button. Use useCallback to memoize the delete handler so it doesn't recreate on every render. Pass the handler as a prop to a child component wrapped in React.memo.

Hints

Solution

Your Code

5 min

Tests

Click Run to test your code