Creates an instance that uniquely identifies and creates views across updates based on the provided key path to the underlying data’s identifier.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
The data that the
Forinstance uses to create views dynamically.
The key path to the provided data’s identifier.
The view builder that creates views dynamically.
It’s important that the
id of a data element doesn’t change, unless SwiftUI considers the data element to have been replaced with a new data element that has a new identity. If the `id` of a data element changes, then the content view generated from that data element will lose any current state and animations.