Stateless functional component - return error

Stateless functional component - return error
0

#1

I am having an error returning a stateless functional component but I can’t see to find what’s the issue.

What’s wrong with my return statement ?


#2

maybe wrap everything in a div?


#3

I wrapped everythin withn <React.Fragment></React.Fragment> just in case but it’s no use. If I use a class then it works but as a functional component I get the error, weird.


#4

I might need glasses, but I think your function should have {} not the ().

const Navbar = (props) => {
// code here
}


#5

I’m the one who needs glasses, I think it’s definitely time to take a break now :rofl:

Thanks.