rewrite challenges on react