Schrödinger interview question

Why did you use react? Class vs. functional react? Given a string and an array of strings, find whether the given string is in the array or not.