---
title: "onDisappear(perform:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/ondisappear(perform:)"
---

# onDisappear(perform:)

Adds an action to perform after this view disappears.

## Declaration

```swift
nonisolated func onDisappear(perform action: (() -> Void)? = nil) -> some View

```

## Parameters

- `action`: The action to perform. If action is nil, the call has no effect.

## Return Value

Return Value A view that triggers action after it disappears.

## Discussion

Discussion The exact moment that SwiftUI calls this method depends on the specific view type that you apply it to, but the action closure doesn’t execute until the view disappears from the interface.

## See Also

### Responding to view life cycle updates

- [onAppear(perform:)](swiftui/view/onappear(perform:).md)
