Y
Hacker News
new
|
ask
|
show
|
jobs
by
alistairjcbrown
3534 days ago
You'd have to spread in the object, right?
<Component {...{animal}} />
3 comments
hex13
3534 days ago
I know, but it's too verbose for me. BTW there is a discussion about this:
https://github.com/facebook/jsx/issues/23
link
sorahn
3533 days ago
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} />
link
skosch
3534 days ago
Yes, absolutely. Ignore what I wrote.
link