DEV Community

Fatima Alam
Fatima Alam

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 ->

Top comments (0)