Contents

id(_:)

Binds a view’s identity to the given proxy value.

Declaration

nonisolated func id<ID>(_ id: ID) -> some View where ID : Hashable

Discussion

When the proxy value specified by the id parameter changes, the identity of the view — for example, its state — is reset.

See Also

Managing the view hierarchy