react-native/Libraries/ReactIOS/renderApplication.js
Christopher Chedeau 2b66b21c95 Updates from Mon 16 Mar
- [ReactNative] Share same server port for debugger proxy | Alex Kotliarskyi
- [react-packager] small fixes to image loader | Amjad Masad
- [ReactNative] NetworkInformation.reachability API w/ example | Eric Vicenti
- [ReactNative] Put launchOptions in RCTPushNotificationManager | Andrew Rasmussen
- [ReactNative] Improve PixelRatio documentation | Christopher Chedeau
2015-03-16 19:01:28 -07:00

29 lines
648 B
JavaScript

/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule renderApplication
*/
'use strict';
var PushNotificationIOS = require('PushNotificationIOS');
var React = require('React');
var invariant = require('invariant');
function renderApplication(RootComponent, initialProps, rootTag) {
invariant(
rootTag,
'Expect to have a valid rootTag, instead got ', rootTag
);
var initialNotification = PushNotificationIOS.popInitialNotification();
React.render(
<RootComponent
pushNotification={initialNotification}
{...initialProps}
/>,
rootTag
);
}
module.exports = renderApplication;