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,
}
}
})









share|improve this question




















  • 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















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,
}
}
})









share|improve this question




















  • 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













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,
}
}
})









share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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














  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







這個網誌中的熱門文章

Hercules Kyvelos

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud