I'm reading the LWC Developer Guider and I have found this sentence:

Note Fields are reactive. Expandos are not reactive.

I am not able to understand what it means with "expandos". Can you help me or provide some examples of that?


Update: thanks to your help now is clear what expando means but now there is another doubt.

If I have this code:

    <p>object prop: {x.a}</p>

    <button onclick={init}>Init</button>
    <button onclick={update}>Update</button>

import { LightningElement, track } from 'lwc';
export default class App extends LightningElement {
    @track x = {};

    init() {
        this.x.a = "a";

    update() {
        this.x.a = "aa";

As far as I understood, the property "x.a" is an expando property since I added it after I defined/created the Object but when I click the two buttons the value on the UI is updated and this means the property is reactive.

Am I missing something? Thanks


1 Answer 1


It is possible to have properties of a tracked object trackable themselves and this has been working for us since Summer '19 at least. You do this is in the declaration of the tracked property. For you, you would update the declaration thus:

@track x: {
    a: undefined

This ensures that a change to "x" itself, or to the "a" property within it will both invoke reactive processing.

As mentioned by BritishBoyInDC there have been some recent changes on tracking which may be why you see what you see and the apparent divergence against the documentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .