Sprig Interview Question

API design, debug a React program