link vs. navigate and migrating syntax

I am using link to navigate my app currently, but I see there is an advanced navigate paradigm available.

When should I use e.g.: navigate.clear or navigate.replace ? Do these provide some benefit over link syntax and how should I determine whether to implement this on an existing app?

Both navigate.clear and navigate.replace aim to reduce the input needed to navigate back to the user's desired destination.

  • navigate.clear completely clears the view stack and navigates to the specified destination
  • navigate.replace is very well suited for non-linear flows, as it does not build up a history in the view stack

For more information, see https://docs.journeyapps.com/reference/container/view-navigation#application

2 Likes