Hi i am trying to pass firstname and lastname in function call when inside jsx but I always get a declaration error as a return how can you help me with this task
I ended up just calling it inside the h2 tag like this :
export const element = () => {
return <div>
<div>Welcome on board</div>
<h2>{getUser()}</h2>
</div>
};
But I get an error saying:
- {firstName} {lastName} (field of object returned by getUser) should be the inner text of the h2 heading
Thank you in advance!!