carsonwah / react-native-push-notification-popup

A <NotificationPopup/> component for presenting your own push notification in react-native app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use globally

graig12 opened this issue · comments

this is not an issue per say bit how can we use this globally
as opposite to on a particular screen. I am using react navigation lib
and i want this to be able to triggered irrespective of the screen the user is currently on

put the component in app.js

Sorry for the late reply. This is a good suggestion and definitely worth doing.

Technically I do not have the experience of doing it but I will take a look into some toast libraries and figure it out.

Any contribution is also welcome too.

put the component in app.js

Why will this not work?

Maybe he wants an adhoc way to show the popup, e.g. some specific screens want to show it.
I think this is a valid feature request, because it will be more convenient if we can call it anywhere in the app.

Is it not possible to put the component in the app.js add a listener for global state updates and fire notification off this?

I have a query. How can I show popup in my app's background state? Can anybody tell me about that?