3megawatt interview question

Mostly on react