/fragments

A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding extra nodes to the DOM.

Primary LanguageJavaScript

25 - Fragments

Render React frangement components

{
     items.map(item => (
     <React.Fragment key={item.id}>
         <h1>Title </h1>
         <p>{item.title}</p>
     </React.Fragment>
     ))
 }

Short hand syntext to react component => Distavantage : You can not pass key to the elements

 <>
 <td>Jagruti </td>
 <td>Metaliya </td>
</>