Open chrisoemma opened 5 years ago
React.fragment is very important if you are trying to render multiple child components, All your components supposed to be inside of React.Fragment tag
<React.Fragment>
<child1 />
<child2 />
<child3 />
</React.Fragment>
or
<>
<child1 />
<child2 />
<child3 />
</>
Cheers
I advice using fragment and also you don't have to call React.Fragment
just import React, {Fragment} from 'react'
Hello people,
I just come across this post which explains why we should not use pointless div just to close the elements in one tag. Chere it here https://www.barrymichaeldoyle.com/fragment/
Let's all be professional developers.
Cheers