Fairly new to React with a potential silly question.
How is it possible that I can omit Reacts return statement with parenthesis.
const Nav = () => (
<nav className="c_navbar">
{ some jsx magic here }
</nav>
)
while I see other instances like this:
const Nav = () => {
return (
<nav className="c_navbar">
{ some jsx magic here }
</nav>
)
}
As far as I understand the ()
help when I return an object literal so that it doesn't mix it up with a code block. But I don't see this applicable here?
Thanks
return (...)
part which is important here.