← React Intermediate Questions - Set 12 Q118

What is the difference between `props.children` and `React.cloneElement`?

React Intermediate Questions - Set 12

Example

<Layout>{children}</Layout>                       // render as given
React.cloneElement(child, { extra: 1 })          // copy with new props

What to notice

← Back to the question list