How to access "this" inside the onNotification?
See original GitHub issueAt first I had PushNotification.configure({
in index.android.js
outside the class declaration but now I have it inside the componentDidMount
, is anything wrong with this?
Now I want to have access to this.state
inside the onNotification
but I don’t know how.
I tryed to add a PushNotification.addEventListener
to an external method but the class doesn’t accept it.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
OnNotification() function dosen't work when i send ...
1 Answer 1 ... PushNotificationIOS.getInitialNotification().then(notification => { if (!notification) { return; } });. I just implemented and ...
Read more >How to use the react-native-push-notification.onNotification ...
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >Handling Incoming Push Notifications in AWS Amplify - Medium
AWS Amplify provides two push notification configuration functions to configure how push notifications are handled by your app: onNotification, ...
Read more >ServiceWorkerGlobalScope: notificationclick event - Web APIs
Use the event name in methods like addEventListener() , or set an event ... console.log('On notification click: ', event.notification.tag); ...
Read more >Receive messages in a JavaScript client - Firebase - Google
If the link value points to a page that is already open in a browser tab, a click on the notification brings that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know it´s solved but here is a simpler way
@mklb thanks so much…very2 appreciate.