DEV Community

Discussion on: Why you should be using Fragments

Collapse
 
link2twenty profile image
Andrew Bone

I think you made a typo when showing the <> syntax. You have to have the closing slash 😊

import React from 'react'
const App = () => {
  return ( 
    <>
      <p>Hello</p>
      <p>World</p>
    </>
  )
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
aaronsm46722627 profile image
Aaron Smith

Hi Andrew.

Thanks so much for the feedback! I've never liked writing code on here haha!

Kind regards
Aaron