POS navigation, replace history functionality

The navigation api has 3 functions:

  • dismiss
  • pop
  • navigate

A replace method would be useful since there are lots of cases where I have to pop multiple times to go to the main screen. Even though navigate says:

Navigate to a route in current navigation tree. Pushes the specified screen if it isn’t present in the navigation tree, goes back to a created screen otherwise.

The second part of the statement does not work for me. If I have this flow: A -> B -> C, and from C I navigate to A, it feels like it pushes A onto the stack, since the action at the top is not an X (close) anymore, it is a arrow left (go back) action.

Hey @Stefan_Buciu - thanks for flagging this. Could you share a code snippet showing how you’re implementing the A→B→C navigation flow and a minimal reproducible example I could test? If possible, a quick screen recording showing the issue with the back arrow appearing instead of the X would be really helpful too.

I hear you on wanting a ‘replace’ method - that would definitely be useful for cases like yours, though one isn’t available at the moment, but I’m wondering if there could potentially be an issue with the API per what you mentioned with the top action or if I can suggest a workaround for you here - hope to speak soon!