DEV Community

FatimaAlam1234
FatimaAlam1234

Posted on

React Fragment

Fragment uses ->
The return statement in JSX should be passed as single tag for which we have to use div
There are some tags which are not compatible with

as it's parent (For eg. -> )
so we use shorthand -> (<></>)
We can also specify a key corresponding to a react fragment for a list of items ->

Image description

Top comments (0)