react-native-push-notification-popup icon indicating copy to clipboard operation
react-native-push-notification-popup copied to clipboard

Use globally

Open graig12 opened this issue 5 years ago • 7 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

graig12 avatar Dec 09 '18 16:12 graig12

put the component in app.js

pribadi1st avatar Dec 13 '18 12:12 pribadi1st

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.

carsonwah avatar Jan 02 '19 08:01 carsonwah

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

carsonwah avatar Mar 03 '19 05:03 carsonwah

put the component in app.js

Why will this not work?

alexpchin avatar Apr 08 '19 21:04 alexpchin

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.

carsonwah avatar Apr 09 '19 09:04 carsonwah

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

JDMathew avatar Feb 10 '21 00:02 JDMathew

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

16ntu1120 avatar Aug 31 '21 08:08 16ntu1120