Skip to content

navigate method vs push method #1498

Answered by Milad-Akarie
ferrarafer asked this question in Q&A
Discussion options

You must be logged in to vote

@ferrarafer I always seem to miss the threads here because the stupid Discussions tap has no counter badge.

Well "navigating without context is not recommended in nested navigation unless you use navigate instead of push" is only applicable if you work with absolute paths, but I guess it's relatively old now, in recent versions auto_route can auto find the route-scope and push it to the right router.

if you have a stack that looks like the following:
/products/12

and you push /products/12/reviews that's a whole new stack added to the hierarchy,

but if you navigate to /products/12/reviews only reviews will be added to already existing stack

and if you only push 'reviews' then you'll get th…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ferrarafer
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