how to detect component or string in react js code example Example: how to check if the const is jsx var x = "a" console.log(typeof x)