3 ms·
Huh. I've been using React for several years and am deeply involved in the community, and this is the first time I've ever seen a JSX element passed as a prop w
by acemarke 8y ago
Huh. I've been using React for several years and am deeply involved in the community, and this is the first time I've ever seen a JSX element passed as a prop without enclosing curlies.
In other words, I've seen this:
<SomeComponent leftPanel={<LeftPane />} />
but I didn't even know you could do this:
<SomeComponent leftPanel=<LeftPane /> />
Small quirk of JSX syntax that almost no one knows exists, I guess.