mediumReact Native#16

React.memo and useMemo

Prompt

Create an expensive computation (factorial calculation) and memoize it with useMemo. Wrap the display component in React.memo to prevent re-renders when its props haven't changed.

Hints

Solution

Your Code

10 min

Tests

Click Run to test your code