O
O
Oleg Sevoc2020-02-24 15:18:47
React
Oleg Sevoc, 2020-02-24 15:18:47

Why doesn't React understand html?

import React from 'react';
import './App.css';

const App = () =>{

    return{
  <div className="App">
Hello
  </div>
    };

}

Failed to compile
./src/App.js
  Line 7:3:  Parsing error: Unexpected token

   5 | 
   6 |     return{
>  7 |   <div className="App">
     |   ^
   8 |   hello
   9 |   </div>
  10 |     };

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2020-02-24
@mrgreeg7

import React from 'react';
import './App.css';

const App = () =>{

    return (<div className="App">Hello</div>)


}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question