# observer

[SwiftUI](../../..) ⟩ [view](../..) ⟩ observer

{% hint style="success" %}
With respect to an [observable object](observableobject), an <mark style="color:purple;">observer</mark> is <mark style="color:yellow;">any</mark> [view](../..) or <mark style="color:yellow;">object</mark> that <mark style="color:yellow;">uses the observable object's data</mark>. When the observable object's <mark style="color:yellow;">data changes</mark>, SwiftUI recognizes the change, and <mark style="color:yellow;">tells the</mark> <mark style="color:purple;">observers</mark> <mark style="color:yellow;">to update</mark>.

Also called a <mark style="color:purple;">subscriber</mark>.
{% endhint %}

{% tabs %}
{% tab title="👥 相關" %}
* [observableobject](observableobject "mention")
{% endtab %}
{% endtabs %}
