Scripting supports SwiftUI-style lifecycle hooks onAppear and onDisappear to execute custom logic when a view becomes visible or is removed from the visible interface. These hooks allow you to trigger animations, start data loading, update state, or perform cleanup when views enter or exit the screen.
| Property | Type | Description |
|---|---|---|
onAppear |
() => void |
Called when the view becomes visible. |
onDisappear |
() => void |
Called when the view is no longer visible on screen. |