init(_:id:content:)
Creates dynamic instructions that produce content for each element of a collection.
Declaration
init(_ data: Data, id: KeyPath<Data.Element, ID>, @DynamicInstructionsBuilder content: @escaping (Data.Element) -> Content)Parameters
- data:
The collection whose elements each produce content.
- id:
A key path to a property that uniquely identifies each element.
- content:
A builder closure that produces the dynamic instructions for an element.
Discussion
Don’t create this type directly. Instead, use DynamicInstructions.ForEach within the body of your DynamicInstructions.