2015-01-30 01:10:49 +00:00
|
|
|
/**
|
|
|
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* @providesModule renderApplication
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
2015-03-12 19:51:44 +00:00
|
|
|
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
|
|
|
|
);
|
2015-03-17 02:01:28 +00:00
|
|
|
var initialNotification = PushNotificationIOS.popInitialNotification();
|
2015-03-12 19:51:44 +00:00
|
|
|
React.render(
|
|
|
|
<RootComponent
|
2015-03-17 02:01:28 +00:00
|
|
|
pushNotification={initialNotification}
|
2015-03-12 19:51:44 +00:00
|
|
|
{...initialProps}
|
|
|
|
/>,
|
|
|
|
rootTag
|
|
|
|
);
|
2015-01-30 01:10:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = renderApplication;
|