All Questions

3
votes
3answers
397 views

How to reset TabNavigator when user logs out (from other screen)

Here is my project file hierarchy RootTabNavigator | AuthStackNavigator // I want to go back to this navigator | AuthoScreen | Welcome Screen | MainTabNavigator // I want to res...
10
votes
4answers
9630 views

Resetting the navigation stack for the home screen (React Navigation and React Native)

I've got a problem with the navigation of React Navigation and React Native. It is about resetting navigation and returning to the home screen. I've build a StackNavigator inside of a DrawerNavigator...
3
votes
1answers
2070 views

Reset navigation history to Login screen using react navigation

I would like after Login (Welcome) the user to navigate to Home. I reset the history so the user cannot go back like this: const actionToDispatch = NavigationActions.reset({ index: 0, ...
2
votes
1answers
506 views

Pass props from child to parent react navigation

I am using react-navigation. I am passing propsfrom a react-native component to the modal from react-navigation which is opened on a tap. export default class SomeComp extends Component { ... render...
4
votes
2answers
1902 views

How to stop the Android Hardware Back Button from functioning in react-navigation for react-native?

I am developing a trivia game, I am using react-navigation to handle navigation, I have 3 components, (newGame, Questions, Results ) I don't want the user to go back to the questions from the results ...
9
votes
4answers
1692 views

React-native/react-navigation: how do I access a component's state from `static navigationOptions`?

How do you handle cases when you have, say, a form component, and you need to submit a part of the component's state using button in navigation bar? const navBtn = (iconName, onPress) => ( <T...
4
votes
1answers
4399 views

React Native - React Navigation transitions

I'd like to use React Navigation in my new react native app but I can't find any example showing how to create custom view transitions in there. Default transitions are working fine but I'd like to be...
2
votes
0answers
46 views

How to dispatch multiple actions in react-navigation?

I want to perform two actions but it doesn't work. const backAction = NavigationActions.back({ key: null }) const dispatchLogoutAction = NavigationActions.reset({ index: 0, actions: [Nav...
0
votes
1answers
42 views

StackNavigator through Component gives undefined error

I was trying to use StackNavigator for navigation and it works when I use it to go from one screen to the other as explained here. But when I try to have a subcomponent to navigate through itself, the...
4
votes
1answers
868 views

react-navigation: How to change tabBar color based on current tab

I'm getting started with react-navigation. How do I change the tabBar background color when I change tab? Here is some pseudo-code showing what I'm hoping for: _backgroundColor = function() { s...

Previous Next