mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
2b66b21c95
- [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
29 lines
648 B
JavaScript
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;
|