Stateless functional component - return error

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 ?

maybe wrap everything in a div?

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.

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

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

2 Likes

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

Thanks.

1 Like