re: Reading Data From A JSON File With Gatsby + GraphQL VIEW POST

FULL DISCUSSION
 

Great post, Emma 👌

I have found a mistake with explaining empty brackets in JSX. You are putting:

<>
  <h1>Hello world</h1>
  <p>Another child component</p>
<>

as the same as

<div>
  <h1>Hello World</h1>
  <p>Another child component</p>
<div>

which is not true.

The true equivalent is

<React.Fragment>
  <h1>Hello World</h1>
  <p>Another child component</p>
</React.Fragment>
code of conduct - report abuse