X interview question

I had to write a react all and also do a technical design