react-navigation / react-navigation/react-navigation.github.io
Document the best possible way of navigation upon receiving push notification background and foreground
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 324
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
This is a general question to all who are using react navigation, there is no documentation as to navigate to particular screen when user receives a notification
export const createRootNavigator = (signedIn = false) => {
return StackNavigator({
Login: screen: Login,
Welcome: screen: Welcome,
Loading: screen: Loading,
SignedIn: screen: SignedIn,
});
};
export const SignedIn = TabNavigator ({
Home: screen: HomeNavigation,
FeedBack: screen: FeedBackNavigation,
Search: screen: SearchNavigation,
Me: screen: ProfileNavigation,
});
I am using 'react-native-fcm' to receive the notification when app is in foreground or closed. How should I structure the code to navigate to specific screens upon receiving notification?
Shall I subscribe to onNotification in every screen and then navigate to specific screen or have it at a centralized place? Has anyone tackled this before? sample code would be great
| software | version |
|---|---|
| react-navigation | 1.0.0-beta.26 |
| react-native | 0.49.3 |
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported react-navigation 1.0.0-beta.26 setup and the react-native-fcm notification scenarios described in the issue. Determine whether the documentation should cover centralized handling for foreground and background notifications, and define the guidance or sample code needed for navigation to a specific screen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, react-native
- Domain
- documentation, mobile-dev
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100