What is the difference between using curly brackets and parenthesis whne making functional components in JSX. I have a components called layout which displays props.children
But i want to know if there is a difference or a best practise between when to use what, and for what purpose.
const layout = (props) => {
<Aux>
<div>Toolbar, SideDrawer, Backdrop</div>
<main>
{props.children}
</main>
</Aux>
}
versus
const layout = (props) => (
<Aux>
<div>Toolbar, SideDrawer, Backdrop</div>
<main>
{props.children}
</main>
</Aux>
)