Is my function call correct?

Hello FCC campers, i a confirmation ! this is an JSX code and i want to confirm if the function call is the same as the function call of JS, into the paragraph should i use the () to make call or not necessary !!

let user = {name: "John"};
function getName(){
	return user.name;
}
function App(){
	return <div>
                <p>{getName}</p>
	        </div>
}
1 Like

I think you should add parentheses. The curly braces indicates that you are writing JavaScript already. And without parentheses the function will not be invoked - i suppose

2 Likes

Thank you for the answer !!

1 Like