[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…
Reference in New Issue