Contents

init(path:root:)

Creates a navigation stack with homogeneous navigation state that you can control.

Declaration

@MainActor @preconcurrency init(path: Binding<Data>, @ViewBuilder root: () -> Root) where Data : MutableCollection, Data : RandomAccessCollection, Data : RangeReplaceableCollection, Data.Element : Hashable

Parameters

  • path:

    A Binding to the navigation state for this stack.

  • root:

    The view to display when the stack is empty.

Mentioned in

Discussion

If you don’t need access to the navigation state, use init(root:).