Semrush Interview Question

Explain React memo useMemo and discuss its trade offs, give a practical example in code.