Raeglyn
Raeglyn

Reputation: 125

Uncaught SyntaxError: expected expression, got '<' at ReactDOM.render

I have several years experience as a backend dev, but my frontend experience has been limited to very basic bugfixes in an established frontend codebase. So I have been trying to set up a "hello world" one page app using React Bootstrap so I can learn.

I attempted to just copy the set up in the React Bootstrap Basic Example code sandbox, but I am getting the following console error:

Uncaught SyntaxError: expected expression, got '<' index.js:8:16

I have my current code available at this github repo.

Pretty sure I've made some n00b mistake, but I guess a n00b has to start somewhere.

Upvotes: 1

Views: 1087

Answers (1)

Arthur Harduim
Arthur Harduim

Reputation: 302

By default the browser does not support JSX sintax (IE: <App />). There is a lot of ways to get this working, but I recommend create-react-app

More about JSX: https://reactjs.org/docs/introducing-jsx.html

Upvotes: 1

Related Questions