React native navigator going back to certain app screen when you came from the app home screen
up vote
0
down vote
favorite
I have a question about React-Native navigation.
I have this nested navigation createBottomTabNavigator
then inside a StackNavigator
, others is a StackNavigator
for each element:
-Home
--HomeScreen
-Others
--Others main
--Others list of X objects
--Create X object
-Options
--Options
The problem Im facing is the next, I have a quick link in Homescreen that goes directly to Create X object, thats okay, but when I go back from that screen it does not go to Others list of X objects, but to Others Main.
If I navigate in the normal way, Others main -> Others list of x objects -> create X object, it works perfect.
What I am missing, is the structure inside the stack navigator not right for the behavior I seek?
Others stack navigator code:
const FinquesStack = createStackNavigator({
Finques: FinquesScreen,
Partes: PartesScreen,
CrearParte: CrearParteScreen,
VistaParte: VistaParteScreen,
});
FinquesStack.navigationOptions ={
tabBarLabel:'Finques',
tabBarIcon: ({focused}) => (
<TabBarIcon
focused={focused}
name={Platform.OS === 'ios' ? 'ios-navigate${focused ? '' : '-outline}'}' : 'md-navigate'}
/>
),
};
Main bottom tab navigator that includes Others navigator:
export default createBottomTabNavigator({
HomeStack,
FinquesStack,
CellersStack,
MapaStack,
SettingsStack
},{
tabBarOption:{
activeTintColor: 'black',
inactiveTintColor: 'black',
labelStyle:{
fontSize: 12,
},
activeBackgroundColor: '#D1CCCF',
style:{
backgroundColor: '#FFF9FC',
bordorTopWidth: 0,
}
}
})
javascript reactjs react-native expo
add a comment |
up vote
0
down vote
favorite
I have a question about React-Native navigation.
I have this nested navigation createBottomTabNavigator
then inside a StackNavigator
, others is a StackNavigator
for each element:
-Home
--HomeScreen
-Others
--Others main
--Others list of X objects
--Create X object
-Options
--Options
The problem Im facing is the next, I have a quick link in Homescreen that goes directly to Create X object, thats okay, but when I go back from that screen it does not go to Others list of X objects, but to Others Main.
If I navigate in the normal way, Others main -> Others list of x objects -> create X object, it works perfect.
What I am missing, is the structure inside the stack navigator not right for the behavior I seek?
Others stack navigator code:
const FinquesStack = createStackNavigator({
Finques: FinquesScreen,
Partes: PartesScreen,
CrearParte: CrearParteScreen,
VistaParte: VistaParteScreen,
});
FinquesStack.navigationOptions ={
tabBarLabel:'Finques',
tabBarIcon: ({focused}) => (
<TabBarIcon
focused={focused}
name={Platform.OS === 'ios' ? 'ios-navigate${focused ? '' : '-outline}'}' : 'md-navigate'}
/>
),
};
Main bottom tab navigator that includes Others navigator:
export default createBottomTabNavigator({
HomeStack,
FinquesStack,
CellersStack,
MapaStack,
SettingsStack
},{
tabBarOption:{
activeTintColor: 'black',
inactiveTintColor: 'black',
labelStyle:{
fontSize: 12,
},
activeBackgroundColor: '#D1CCCF',
style:{
backgroundColor: '#FFF9FC',
bordorTopWidth: 0,
}
}
})
javascript reactjs react-native expo
1
please don't the post code in the form an image. It leads to developers unable to copy the code from screenshots. So please edit your question and add the required code. For more stackoverflow.com/help/how-to-ask
– Sateesh
Nov 7 at 12:59
@Sateesh I help him changed it already...
– kit
Nov 8 at 17:59
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a question about React-Native navigation.
I have this nested navigation createBottomTabNavigator
then inside a StackNavigator
, others is a StackNavigator
for each element:
-Home
--HomeScreen
-Others
--Others main
--Others list of X objects
--Create X object
-Options
--Options
The problem Im facing is the next, I have a quick link in Homescreen that goes directly to Create X object, thats okay, but when I go back from that screen it does not go to Others list of X objects, but to Others Main.
If I navigate in the normal way, Others main -> Others list of x objects -> create X object, it works perfect.
What I am missing, is the structure inside the stack navigator not right for the behavior I seek?
Others stack navigator code:
const FinquesStack = createStackNavigator({
Finques: FinquesScreen,
Partes: PartesScreen,
CrearParte: CrearParteScreen,
VistaParte: VistaParteScreen,
});
FinquesStack.navigationOptions ={
tabBarLabel:'Finques',
tabBarIcon: ({focused}) => (
<TabBarIcon
focused={focused}
name={Platform.OS === 'ios' ? 'ios-navigate${focused ? '' : '-outline}'}' : 'md-navigate'}
/>
),
};
Main bottom tab navigator that includes Others navigator:
export default createBottomTabNavigator({
HomeStack,
FinquesStack,
CellersStack,
MapaStack,
SettingsStack
},{
tabBarOption:{
activeTintColor: 'black',
inactiveTintColor: 'black',
labelStyle:{
fontSize: 12,
},
activeBackgroundColor: '#D1CCCF',
style:{
backgroundColor: '#FFF9FC',
bordorTopWidth: 0,
}
}
})
javascript reactjs react-native expo
I have a question about React-Native navigation.
I have this nested navigation createBottomTabNavigator
then inside a StackNavigator
, others is a StackNavigator
for each element:
-Home
--HomeScreen
-Others
--Others main
--Others list of X objects
--Create X object
-Options
--Options
The problem Im facing is the next, I have a quick link in Homescreen that goes directly to Create X object, thats okay, but when I go back from that screen it does not go to Others list of X objects, but to Others Main.
If I navigate in the normal way, Others main -> Others list of x objects -> create X object, it works perfect.
What I am missing, is the structure inside the stack navigator not right for the behavior I seek?
Others stack navigator code:
const FinquesStack = createStackNavigator({
Finques: FinquesScreen,
Partes: PartesScreen,
CrearParte: CrearParteScreen,
VistaParte: VistaParteScreen,
});
FinquesStack.navigationOptions ={
tabBarLabel:'Finques',
tabBarIcon: ({focused}) => (
<TabBarIcon
focused={focused}
name={Platform.OS === 'ios' ? 'ios-navigate${focused ? '' : '-outline}'}' : 'md-navigate'}
/>
),
};
Main bottom tab navigator that includes Others navigator:
export default createBottomTabNavigator({
HomeStack,
FinquesStack,
CellersStack,
MapaStack,
SettingsStack
},{
tabBarOption:{
activeTintColor: 'black',
inactiveTintColor: 'black',
labelStyle:{
fontSize: 12,
},
activeBackgroundColor: '#D1CCCF',
style:{
backgroundColor: '#FFF9FC',
bordorTopWidth: 0,
}
}
})
javascript reactjs react-native expo
javascript reactjs react-native expo
edited Nov 8 at 18:11
kit
772116
772116
asked Nov 7 at 12:16
Josepv
15
15
1
please don't the post code in the form an image. It leads to developers unable to copy the code from screenshots. So please edit your question and add the required code. For more stackoverflow.com/help/how-to-ask
– Sateesh
Nov 7 at 12:59
@Sateesh I help him changed it already...
– kit
Nov 8 at 17:59
add a comment |
1
please don't the post code in the form an image. It leads to developers unable to copy the code from screenshots. So please edit your question and add the required code. For more stackoverflow.com/help/how-to-ask
– Sateesh
Nov 7 at 12:59
@Sateesh I help him changed it already...
– kit
Nov 8 at 17:59
1
1
please don't the post code in the form an image. It leads to developers unable to copy the code from screenshots. So please edit your question and add the required code. For more stackoverflow.com/help/how-to-ask
– Sateesh
Nov 7 at 12:59
please don't the post code in the form an image. It leads to developers unable to copy the code from screenshots. So please edit your question and add the required code. For more stackoverflow.com/help/how-to-ask
– Sateesh
Nov 7 at 12:59
@Sateesh I help him changed it already...
– kit
Nov 8 at 17:59
@Sateesh I help him changed it already...
– kit
Nov 8 at 17:59
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53189307%2freact-native-navigator-going-back-to-certain-app-screen-when-you-came-from-the-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
please don't the post code in the form an image. It leads to developers unable to copy the code from screenshots. So please edit your question and add the required code. For more stackoverflow.com/help/how-to-ask
– Sateesh
Nov 7 at 12:59
@Sateesh I help him changed it already...
– kit
Nov 8 at 17:59