JavaScript React Basics (retired) First Steps in React Our First Application

andrea molinari
andrea molinari
14,850 Points

Goodmorning. Syntax problem

Good morning. I have this problem

function App(){

return( <div>

<hi>Hi React </h1> ^ <p>AAA</p> </div>

) } React.render(<App />, document.getElementById('container'));

Can you help me?

2 Answers

Stuart Wright
Stuart Wright
41,030 Points

Is the problem simply that you've used a <hi> tag rather than <h1> (letter i instead of number 1)?

I Dilate
I Dilate
3,972 Points

You have a few syntax problems in your code there.

As Stuart mentioned, <hi> should definitely be an <h1>, but you must also encapsulate the string you're returning, for example using speech marks:

return ("<div><h1>Hi React</h1></div>");