Skip to content
Discussion options

You must be logged in to vote

If route doesn't exist: clears entire history then pushes the new route

That's not what popTo does. It only replaces the current route (i.e., pops the current route and adds the new route) when adding a non-existent route, not clearing the entire history.

You can replicate the behavior of the old navigate with a pop option in the latest version:

navigation.navigate({ name: 'ScreenName', params: {..}, pop: true })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davidavz
Comment options

Answer selected by davidavz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants