react-native-push-notification-popup
react-native-push-notification-popup copied to clipboard
Use globally
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.
There is an excellent library for this purpose:
- https://github.com/magicismight/react-native-root-siblings
And some of the components based on it:
- https://github.com/magicismight/react-native-root-toast
- https://github.com/magicismight/react-native-root-modal
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?