Just noticed that changing a var in a @Model annot...
# compose
z
Just noticed that changing a var in a @Model annotated class constructor doesn't trigger recomposition, only if the var is declared in the class body.
l
can you provide an example?
z
Copy code
@Model
class Foo(private var bar: Int) {

}

// vs:

@Model
class Foo {
    private var bar: Int
}
l
Really? I was definitely under the impression that that worked
z
That was the only difference at the time I wrote, and rolled it back and forth a couple of times. Worked one way, didn't work the other. I moved on with the working version and now I can no longer reproduce it and it feels stupid.
l
note that one issue that we are aware of is @Model is not doing anything on inner/nested classes
which is just a bug
but it gets ppl a lot
that could have been what you were seeing