CrossFit interview question

How would you optimize this React component? How about this React application?