Last active
April 20, 2017 04:30
-
-
Save mstifflin/27dd9d728ab2610c085a67dcceac50e3 to your computer and use it in GitHub Desktop.
Create Local Android Push Notifications in React Native
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import PushNotification from 'react-native-push-notification'; | |
export default class PushController extends Component { | |
componentDidMount() { | |
PushNotification.configure({ | |
onNotification: function(notification) { | |
console.log('NOTIFICATION: ', notification); | |
}, | |
popInitialNotification: true, | |
}); | |
} | |
render() { | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment