Sprig interview question

API design, debug a React program