[react-native] Bring React.render behavior in line with web

This commit is contained in:
Ben Alpert
2015-03-31 09:50:46 -07:00
parent 4b4e8ecc9b
commit d75bd44e27
2 changed files with 43 additions and 21 deletions

View File

@@ -67,8 +67,12 @@ var augmentElement = function(element: ReactElement) {
return element;
};
var render = function(component: ReactComponent, mountInto: number) {
ReactIOSMount.renderComponent(component, mountInto);
var render = function(
element: ReactElement,
mountInto: number,
callback?: ?(() => void)
): ?ReactComponent {
return ReactIOSMount.renderComponent(element, mountInto, callback);
};
var ReactIOS = {