diff --git a/README.md b/README.md index 22b13406a7ade5f71f304aa8f1089032a9e00164..5da0195ff9ebb55c0ef169c6e25c56e37c2109b0 100644 --- a/README.md +++ b/README.md @@ -291,6 +291,8 @@ class App extends Component { console.log(token) // store fcm token in your server }); + + // NOTE: if you want to handle notifications when app is closed, don't put it in component lifecycle because components won't be initialized. this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => { // there are two parts of notif. notif.notification contains the notification payload, notif.data contains data payload if(notif.local_notification){