3 ms·
You'd have to spread in the object, right? <Component {...{animal}} />
by alistairjcbrown 10y ago
You'd have to spread in the object, right?
<Component {...{animal}} />
- hex13 10y agoI know, but it's too verbose for me. BTW there is a discussion about this: https://github.com/facebook/jsx/issues/23 https://github.com/facebook/jsx/issues/23
- skosch 10y agoYes, absolutely. Ignore what I wrote.
- sorahn 10y agoWe 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} />