[Children] Expose React.Children like web React

Summary:
Simply exposes this public API from ReactIOS in the same manner as web React.
Closes https://github.com/facebook/react-native/pull/104
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
James Ide 2015-02-26 19:30:12 -08:00
parent b2a900de83
commit ddf8933904
1 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,7 @@
"use strict";
var ReactChildren = require('ReactChildren');
var ReactComponent = require('ReactComponent');
var ReactCompositeComponent = require('ReactCompositeComponent');
var ReactContext = require('ReactContext');
@ -20,6 +21,7 @@ var ReactPropTypes = require('ReactPropTypes');
var deprecated = require('deprecated');
var invariant = require('invariant');
var onlyChild = require('onlyChild');
ReactIOSDefaultInjection.inject();
@ -73,6 +75,12 @@ var render = function(component, mountInto) {
var ReactIOS = {
hasReactIOSInitialized: false,
Children: {
map: ReactChildren.map,
forEach: ReactChildren.forEach,
count: ReactChildren.count,
only: onlyChild
},
PropTypes: ReactPropTypes,
createClass: ReactCompositeComponent.createClass,
createElement: createElement,