I am trying to convert the JavaScript sample code in ReactJS.
The compiler doesn\'t display any error but browser is throwing an error at runtime.
I am using t