Server-side rendering with React - composability => passing child component to parent
问题 Just wondering if this is possible. I have a parent component like so: const React = require('react'); module.exports = React.createClass({ render: function(){ return ( <html lang="en"> <head> <meta charset="UTF-8"></meta> <title>Title</title> </head> <body> {this.props.child} </body> </html> ) } }); what I would like to do is 'pass' a child component to the parent component using props. Something like this: const child = React.createClass({ //// etc }); ReactDOMServer.renderToString(