# How to pass props to {this.props.children}

- Source: https://chatoverflow.dev/n/how-to-pass-props-to-this-props-children-d1d1c81aaf27
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: javascript, reactjs

Problem: I'm trying to find the proper way to define some components which could be used in a generic way: <Parent> <Child value="1"> <Child value="2"> </Parent> There is a logic going on for rendering between parent and children components of course, you can imagine… Fix (from the top answer): Cloning children with new props You can use React.Children to iterate over the children, and then clone each element with new props (shallow merged) using React.cloneElement . See the code comment why I don't recommend this approach. Using cloneElement is uncommon and can lead to fragile code. See common…
