React-native-navigation: Navigating between Stacks

Created on 11 Jan 2019  路  1Comment  路  Source: wix/react-native-navigation

Issue Description

Hi Everyone,

I've been trying to achieve a certain navigational flow in RNN for a while now, but have not had any success. Here is the flow I am trying to achieve:

rnn-issue

Let's say you start from the products screen. You are able to explore a product and purchase one, these screens are added to the stack with push. Once the checkout has been completed I want the stack to reset to the orders bottom tab stack with the specific order page on top of the stack.

One solution would be to push the specific orders page onto the stack using an ID e.g. ORDERS_STACK, but then how would I reset the current stack (products), and navigate to the orders tab?

I've tried using setStackRoot but could not achieve what I wanted, it may be due to me using it incorrectly, but I could not find a description on how setStackRoot works anywhere on the repository.

Environment

  • React Native Navigation version: 2.6.0
  • React Native version: 0.57.4
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (iOS/Android, Debug/Release): Both

Most helpful comment

Hey @lukebrandonfarrell
Instead of pushing the screens, you should initiate this flow in a modal - meaning show Details Screen in a modal and push screens into that modal.

When dismissing the modal, select orders tab programatically using mergeOptions

>All comments

Hey @lukebrandonfarrell
Instead of pushing the screens, you should initiate this flow in a modal - meaning show Details Screen in a modal and push screens into that modal.

When dismissing the modal, select orders tab programatically using mergeOptions

Was this page helpful?
0 / 5 - 0 ratings