Pergunta de entrevista da empresa Embross

How would you solve this React issue