Arun Kulasegaran
Arun Kulasegaran

Reputation: 439

Resetting stack with RNN lib

Cannot reset a stack with following use cases.

  1. Let assume Screen A is a root, and navigate to Screen B, Then while navigating to Screen C, I want the stack to have A->C instead of A->B->C.

  2. If a stack has A->B->C and I want to rest the stack with root screen as C.

Please help on this use cases

Upvotes: 1

Views: 399

Answers (1)

guy.gc
guy.gc

Reputation: 3501

  1. This use case is not supported as removing an element from the middle of a stack is not a valid stack api. You probably want to show B in a modal, then push C into the stack contained in the modal. If you want to disallow the user from going back from C to B, then instead of push use setStackRoot with C.

  2. use setStackRoot with C

Upvotes: 0

Related Questions