mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
[ReactNative|MAdMan] Notification Subscribable
This commit is contained in:
parent
221ddd3cfe
commit
30d3117f96
@ -5,6 +5,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var PushNotificationIOS = require('PushNotificationIOS');
|
||||
var React = require('React');
|
||||
|
||||
var invariant = require('invariant');
|
||||
@ -14,7 +15,16 @@ function renderApplication(RootComponent, initialProps, rootTag) {
|
||||
rootTag,
|
||||
'Expect to have a valid rootTag, instead got ', rootTag
|
||||
);
|
||||
React.render(<RootComponent {...initialProps} />, rootTag);
|
||||
var pushNotification = initialProps.launchOptions &&
|
||||
initialProps.launchOptions.remoteNotification &&
|
||||
new PushNotificationIOS(initialProps.launchOptions.remoteNotification);
|
||||
React.render(
|
||||
<RootComponent
|
||||
pushNotification={pushNotification}
|
||||
{...initialProps}
|
||||
/>,
|
||||
rootTag
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = renderApplication;
|
||||
|
Loading…
x
Reference in New Issue
Block a user