Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 836 Bytes

navigation-lifecycle.md

File metadata and controls

29 lines (16 loc) · 836 Bytes

Navigation lifecycle

With the addition of guard middleware, the navigation lifecycle has changed. It will now be as follows:

Lifecycle flowchart

  1. Start on Page A.

  2. Navigation initiated. The loading page is shown.

  3. Check if there are guards left in the queue.

    • If there are guards, continue to step 4.

    • If no guards remain, skip to step 5.

  4. Run the top guard in the queue:

    • next(): Return to step 3.

    • next.props(): Add the props to the render of Page B, and return to step 3.

    • next.redirect(): Redirect to given location, and restart at step 1.

    • Error: Navigation has been prevented. The error page is shown.

  5. Navigation was successful! Page B is shown.