Helsing interview question

write react code that handles some state