React unxepted token '<' error

i don’t understand where i did my error…
can someone help me please ?
A Pen by Dylan (codepen.io)

When I open your pen, I do not see such an error. How do I reproduce it?

FYI, for React projects, the only thing in the HTML section should be something like the following on Codepen:

<div id="root"></div>

and then you would have the following line in your JS:

ReactDOM.render(<Quote/>,document.getElementById('root'))

The rest of the HTML (like buttons, elements containing quote text or author’s name) would be in the render method.

1 Like

You get that error when you do not turn on Babel with JSX on Codepen. I’m guessing they fixed it.

this.state.push(quotes)

state is not an array, quote is the array.

1 Like

i turn my JS on babel and now it work , you were right.thanks