Created
May 17, 2021 19:33
-
-
Save pflevy/2565c620fa6d8ba6a39e544f2a7d3cf3 to your computer and use it in GitHub Desktop.
The best solution is to apply React Fragments when a wrapper element is required since a React Fragment doesn't render an element to the DOM.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const MyComponent = (props) => { | |
return ( | |
<React.Fragment> | |
<li>Grouped list item</li> | |
<li>Grouped list item</li> | |
<li>Grouped list item</li> | |
</React.Fragment> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment