mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove ReactChildren methods from React object
These are not terribly useful on this object and the naming of `React.forEachChildren` sucked anyway.
This commit is contained in:
committed by
Paul O’Shannessy
parent
c8886a0424
commit
3cf14e8f9b
@@ -19,20 +19,20 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
var React = require('React');
|
||||
var ReactChildren = require('ReactChildren');
|
||||
|
||||
var MERGE_KEY_SETS_TAIL_SENTINEL = {};
|
||||
|
||||
var ReactTransitionKeySet = {
|
||||
/**
|
||||
* Given `this.props.children`, return an object mapping key to child. Just
|
||||
* simple syntactic sugar around React.mapChildren().
|
||||
* simple syntactic sugar around ReactChildren.map().
|
||||
*
|
||||
* @param {*} children `this.props.children`
|
||||
* @return {object} Mapping of key to child
|
||||
*/
|
||||
getChildMapping: function(children) {
|
||||
return React.mapChildren(children, function(child) {
|
||||
return ReactChildren.map(children, function(child) {
|
||||
return child;
|
||||
});
|
||||
},
|
||||
@@ -45,7 +45,7 @@ var ReactTransitionKeySet = {
|
||||
* @return {object} Mapping of key to the value "true"
|
||||
*/
|
||||
getKeySet: function(children) {
|
||||
return React.mapChildren(children, function() {
|
||||
return ReactChildren.map(children, function() {
|
||||
return true;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
var ReactChildren = require('ReactChildren');
|
||||
var ReactCompositeComponent = require('ReactCompositeComponent');
|
||||
var ReactComponent = require('ReactComponent');
|
||||
var ReactDOM = require('ReactDOM');
|
||||
@@ -40,8 +39,6 @@ var React = {
|
||||
createClass: ReactCompositeComponent.createClass,
|
||||
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
|
||||
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
|
||||
forEachChildren: ReactChildren.forEach,
|
||||
mapChildren: ReactChildren.map,
|
||||
renderComponent: ReactPerf.measure(
|
||||
'React',
|
||||
'renderComponent',
|
||||
|
||||
Reference in New Issue
Block a user