Skip to content

Instantly share code, notes, and snippets.

@mstifflin
Last active April 20, 2017 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mstifflin/27dd9d728ab2610c085a67dcceac50e3 to your computer and use it in GitHub Desktop.
Save mstifflin/27dd9d728ab2610c085a67dcceac50e3 to your computer and use it in GitHub Desktop.
Create Local Android Push Notifications in React Native
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