hims & hers interview question

Solve a problem/task in a react component