# propertyChanged in Au2

**URL:** <https://discourse.aurelia.io/t/propertychanged-in-au2/5256>\
**Category:** vNext\
**Created:** [September 26, 2023, 12:04pm UTC](https://discourse.aurelia.io/t/propertychanged-in-au2/5256 "2023-09-26T12:04:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elitastic](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitastic/32/1787_2.png) [@elitastic](https://discourse.aurelia.io/u/elitastic)\
**Post date:** [September 26, 2023, 12:04pm UTC](https://discourse.aurelia.io/t/propertychanged-in-au2/5256/1 "2023-09-26T12:04:58Z")

</div>

In Au1 there was a hook called “propertyChanged()” to react to changes of bound properties.

```auto
export class MyComponent {
   @bindable
   prop1: string;
   @bindable
   prop2: string;
   @bindable
   prop3: string;
   @bindable
   prop4: string;

   propertyChanged() {
       // is called when any of the props changes
   }
}

```

Is there something similar in Au2?

---

<div class="post-metadata">

**Author:** ![davidsk](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/davidsk/32/930_2.png) [@davidsk](https://discourse.aurelia.io/u/davidsk)\
**Post date:** [September 26, 2023, 12:09pm UTC](https://discourse.aurelia.io/t/propertychanged-in-au2/5256/2 "2023-09-26T12:09:03Z")

</div>

I think this is what you’re looking for: [Observing property changes with @observable - The Aurelia 2 Docs](https://docs.aurelia.io/getting-to-know-aurelia/observation/observing-property-changes-with-observable)

---

<div class="post-metadata">

**Author:** ![davidsk](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/davidsk/32/930_2.png) [@davidsk](https://discourse.aurelia.io/u/davidsk)\
**Post date:** [September 26, 2023, 12:10pm UTC](https://discourse.aurelia.io/t/propertychanged-in-au2/5256/3 "2023-09-26T12:10:11Z")

</div>

Or maybe [Watching data - The Aurelia 2 Docs](https://docs.aurelia.io/getting-to-know-aurelia/watching-data)

---

<div class="post-metadata">

**Author:** ![elitastic](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitastic/32/1787_2.png) [@elitastic](https://discourse.aurelia.io/u/elitastic)\
**Post date:** [September 26, 2023, 12:39pm UTC](https://discourse.aurelia.io/t/propertychanged-in-au2/5256/4 "2023-09-26T12:39:02Z")

</div>

Thank you, @davidsk!

The `callback` of `@observable` is what I’m looking for!

---

<div class="post-metadata">

**Author:** ![ghiscoding](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/ghiscoding/32/1199_2.png) [@ghiscoding](https://discourse.aurelia.io/u/ghiscoding)\
**Post date:** [September 30, 2023, 5:45am UTC](https://discourse.aurelia.io/t/propertychanged-in-au2/5256/5 "2023-09-30T05:45:56Z")

</div>

Also just so you know, the `xChanged` still exist but there was a breaking change in Au2 which is that it isn’t called on the initial component initialization while it was in Au1. See this Au2 doc

> **[Bindable properties](https://docs.aurelia.io/components/bindable-properties#calling-a-change-function-when-bindable-is-modified)**
>
> How to create components that accept one or more bindable properties. You might know these as "props" if you are coming from other frameworks and libraries.
