+ 1

React: Unexpected token "<"

Why have I got an error? I'm using a class component and it returns a JSX div, but it keeps saying "unexpected token '<'" https://code.sololearn.com/WkWEEXSH1k0O/?ref=app

3rd Aug 2020, 1:48 PM
Clueless Coder
Clueless Coder - avatar
4 odpowiedzi
+ 4
//</script><script type="text/babel">
3rd Aug 2020, 2:01 PM
ODLNT
ODLNT - avatar
+ 4
Ipang React is really annoying to run in different environments so I'm not surprised. It's most likely when the program halts/stops. This could be because of debugging or error messages
3rd Aug 2020, 2:05 PM
Clueless Coder
Clueless Coder - avatar
+ 2
🤦‍♂️ I knew it was a stupid typo!
3rd Aug 2020, 2:04 PM
Clueless Coder
Clueless Coder - avatar
+ 1
Clueless Coder Idk if this was relevant. But as I view your code in Chrome browser, there's a red button to the left of line number (at line 8). It shows a message when I tap on the red button.
3rd Aug 2020, 2:00 PM
Ipang