react-native/Libraries/ReactIOS/renderApplication.js

29 lines
648 B
JavaScript
Raw Normal View History

2015-01-30 01:10:49 +00:00
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule renderApplication
*/
'use strict';
var PushNotificationIOS = require('PushNotificationIOS');
2015-01-30 01:10:49 +00:00
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
);
2015-01-30 01:10:49 +00:00
}
module.exports = renderApplication;