D
D
DeniSidorenko2017-09-03 13:47:10
React
DeniSidorenko, 2017-09-03 13:47:10

Why doesn't jsx compile?

Hello, I don't understand the reason for the error.

import React from 'react'

export default function Article(){
  return {
    <div>
      <h1> Hello</h1>
      <section> Body</section>
    </div>
  }
}

ee41978173.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2017-09-03
@DeniSidorenko

How to solve this problem with React?
Read documentation .
return (
    <div>
      <h1> Hello</h1>
      <section> Body</section>
    </div>
  )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question