---
title: "onChange(of:initial:_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/compositorcontent/onchange(of:initial:_:)"
---

# onChange(of:initial:_:)

## Declaration

```swift
nonisolated func onChange<V>(of value: V, initial: Bool = false, _ action: @escaping () -> Void) -> some CompositorContent where V : Equatable

```
