title: OneSignal + React Native + background notifications
body: <p>I am making a react native app with <a href="https://github.com/geektimecoil/react-native-onesignal" rel="nofollow noreferrer">oneSignal push notifications</a>. I would like to just change the screen when a notification is received. I can do this if the app is in the foreground or if the notification was clicked. How would I trigger this if the app is closed or in the background?</p>
  
  <pre><code>import OneSignal from 'react-native-onesignal';
  
  export default class Test extends Component {
  
    componentWillMount() {
      OneSignal.addEventListener('received', this.onReceived);
      OneSignal.addEventListener('opened', this.onOpened);
      OneSignal.addEventListener('registered', this.onRegistered);
      OneSignal.addEventListener('ids', this.onIds);
    }
  </code></pre>