React-native-fcm: Example to Navigate user to some particular screen on notification click

Created on 26 Feb 2018  路  7Comments  路  Source: evollu/react-native-fcm

@evollu could you please add an example project to show what is the standard way of navigating users to some screen when notification is received using react-native-fcm library.

Because it is getting confusing/ complicated for no obvious reason. This is the list of issues I'm getting:

  • Confuse where to get values in FCM.On event or in FCM.getInitialNotification.
  • Notification data values not changed while received in getInitialNotification so navigating to the same screen when opening the app.
  • Either defining event(FCM.ON & FCM.getInitialNotification) inside component lifecycle or outside.

and so many other questions.

If you can do that it would be great. I'm ready to help in this regard to reproduce the above list, if needed.

  1. What version of RN and react-native-fcm are you running?

  2. What device are you using? (e.g iOS9 emulator, Android 6 device)?
    all devices android/ios

  3. Is your app running in foreground, background or not running?
    foreground & background

Most helpful comment

example added

All 7 comments

there seems to be couple nav libraries.
which is more popular? react-navigation?

yes react-navigation is amongst the most popular one. If you can just provide one example project using it, it would be great,

example added

Thank you. I will update you if all issues are resolved.

@evollu the example helped in this and issue is resolved.

@evollu can you please give me the example too ! i am also on the same place.

@evollu can you please give me the example. i am also on the same place please

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Keksike picture Keksike  路  5Comments

404sand808s picture 404sand808s  路  5Comments

andryuwka picture andryuwka  路  6Comments

jitenderchand1 picture jitenderchand1  路  4Comments

KBepo picture KBepo  路  4Comments