Dynamically nesting React.js components. When you nest React elements into other React elements in JSX, the parent element gets passed a children prop that contains the children elements.
1 2 3 4 5 6 7 | var Group = React.createClass({ render: function(){ return ( <fieldset>{this.props.children}</fieldset> ); } }); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.