Hacker News new | ask | show | jobs
by alistairjcbrown 3534 days ago
You'd have to spread in the object, right?

<Component {...{animal}} />

3 comments

I know, but it's too verbose for me. BTW there is a discussion about this: https://github.com/facebook/jsx/issues/23
We already do this when we have a lot of props to pass down. "A lot" usually means enough to take the line past 100 columns.

const componentProps = {}; <Component {...componentProps} />

Yes, absolutely. Ignore what I wrote.