Using <></>
is just bad practice IMO.
I recommend only using <div></div>
when you require the children to be placed inside an parent element. Otherwise it is pointless/excess html that is just not required.
For example we have a classname associated with the Div element.
<body>
<div classname="people-group-1">
<h1>Hello Shippers</h1>
<h1>Hello Matey</h1>
<h1>Hello Pal</h1>
</div>
<div classname="people-group-2">
<h1>Hello Mucka</h1>
<h1>Hello Geeza</h1>
<h1>Hello Dude</h1>
</div>
</body>
I don't recommend using the following example as the Div elements serve no purpose apart from a readability perspective.
<body>
<div>
<h1>Hello Shippers</h1>
<h1>Hello Matey</h1>
<h1>Hello Pal</h1>
</div>
<div>
<h1>Hello Mucka</h1>
<h1>Hello Geeza</h1>
<h1>Hello Dude</h1>
</div>
</body>
<!-- No different to--->
<body>
<h1>Hello Shippers</h1>
<h1>Hello Matey</h1>
<h1>Hello Pal</h1>
<h1>Hello Mucka</h1>
<h1>Hello Geeza</h1>
<h1>Hello Dude</h1>
</body>
If you need to return multiple elements which dont need a parent, you can use this approach.
import React, { Fragment } from 'react'
const names = ['Shippers', 'Matey', 'Pal', 'Mucka', 'Geeza', 'Dude']
export const Headers = () => (
<Fragment>{names.map(name => <h1>{`Hello ${name}`}</h1>)}</Fragment>
)
Then you can import it to the renderer of wherever like.
import React from 'react'
import { Headers } from './Headers'
export const Body = () (
<body>
<Headers />
</body>
)
This will transpile into
<body>
<h1>Hello Shippers</h1>
<h1>Hello Matey</h1>
<h1>Hello Pal</h1>
<h1>Hello Mucka</h1>
<h1>Hello Geeza</h1>
<h1>Hello Dude</h1>
</body>