ElaniziDev
ElaniziDev

Reputation: 21

What is the difference between calling components in JSX and passing them as children props?

So I was navigating on web, and I saw a senior developer talking about that most of junior developers don't know the difference between calling components in JSX and passing them as children props. And honestly I don't know the difference. Can any one tell me the difference between them, is it performance, is it the architecture...

Thank you.

Upvotes: 0

Views: 39

Answers (1)

YAMM
YAMM

Reputation: 602

So according to the information I got I think the best information on the topic is found here here and here .

Main difference is probably the scope in which the components are declared, so you can declare click handlers in a different way.

Upvotes: 1

Related Questions