Quantiphi interview question

Asked to write component in react to handle forms