Navigation

Learn how to use the navigation tools in the library, including how to best model your domains, how to integrate features in the reducer and view layers, and how to write tests.

Navigation.md

Overview

State-driven navigation is a powerful concept in application development, but can be tricky to master. The Composable Architecture provides the tools necessary to model your domains as concisely as possible and drive navigation from state, but there are a few concepts to learn in order to best use these tools.

Essentials

  • What is navigation?

    Learn about the two main forms of state-driven navigation, tree-based and stack-based navigation, as well as their tradeoffs.

    Read More

Tree-based navigation

  • Tree-based navigation

    Learn about tree-based navigation, that is navigation modeled with optionals and enums, including how to model your domains, how to integrate features, how to test your features, and more.

    Read More
  • macro Presents()

    Wraps a property with PresentationState and observes it.

  • enum PresentationAction<Action>

    A wrapper type for actions that can be presented.

  • Reducer/ifLet(_:action:destination:fileID:filePath:line:column:)-4ub6q

Stack-based navigation

Dismissal

See also

  • Getting started

    Learn how to integrate the Composable Architecture into your project and write your first application.

    Read More
  • Dependencies

    Learn how to register dependencies with the library so that they can be immediately accessible from any reducer.

    Read More
  • Testing

    Learn how to write comprehensive and exhaustive tests for your features built in the Composable Architecture.

    Read More
  • Sharing state

    Learn techniques for sharing state throughout many parts of your application, and how to persist data to user defaults, the file system, and other external mediums.

    Read More
  • Performance

    Learn how to improve the performance of features built in the Composable Architecture.

    Read More
  • Frequently asked questions

    A collection of some of the most common questions and comments people have concerning the library.

    Read More