---
title: "id(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/id(_:)"
---

# id(_:)

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

## Declaration

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

```

## Discussion

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

- [tag(_:includeOptional:)](swiftui/view/tag(_:includeoptional:).md)
- [equatable()](swiftui/view/equatable().md)
