What is the impact of using useMemo on the component's memory usage?
useMemo can improve performance by reusing a cached calculation result when dependencies have not changed, but keeping that cached value and dependency list can increase memory usage. It should be used when the saved computation work is worth the memoization overhead.