Virtual DOM wrapper in react

Viewed 22

Only for theoretical purposes, Is there a way to return multiple elements in react component without wrapping them in with a parent, <> </>, React.Fragment or {}. for example just like this :

const Items = () => {


return (
    
      <li>First element</li>
      <li>Second element</li>
      <li>Third element</li>
    
  );
}
1 Answers

Why do you need it, react fragment is not rendered in DOM

Related