Skip to content

React.renderComponentToString failing case when component children is a function #860

Closed
@swannodette

Description

@swannodette
var Hello = React.createClass({
    componentDidMount: function() {},
    render: function() {
        return this.props.children();
    }
});

React.renderComponentToString(
    Hello(null, function() { return React.DOM.div(null, "Hello"); }), 
    function(s) { console.log(s); }
);

Results in:

Uncaught TypeError: Cannot read property 'firstChild' of undefined 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions