-
Notifications
You must be signed in to change notification settings - Fork 49.5k
Closed
Description
I am not sure whether it is a bug. Let's look at the following code(or in JSFiddle):
var Test = React.createClass({
render: function() {
console.log(React.Children.map(this.props.children, function(child) {
return child;
}));
// console.log(this.props.children);
return this.props.children;
}
});
React.render(
React.createElement(Test, {}, React.createElement('input', {})), document.body)
I think the returned value of React.Children.map
should be the same as this.props.children
. But what surprise me is that the returned value is something like this: {'.0': ReactElement}
.
Do I misunderstand React.Children.map
?
Metadata
Metadata
Assignees
Labels
No labels