I am trying to convert JavaScript code to ReactJS.
The compiler doesn\'t display any error but browser is throwing an error at runtime.
I expect to see it work