Hi, I recently upgrade my sample project from `dev...
# compose
g
Hi, I recently upgrade my sample project from
dev-08
to
dev-14
(yea, a lot of changes x)) and see that you removed
@Model
annotation. According to your changelog, you suggest to use
state
or
remember
delegate functions but when I see your commit in your git repository with this breaking change, I found
@Stable
annotation with the exact same behavior as
@Model
. Someone can tell me what is this annotation?
z
I believe the using the Stable annotation on a type merely informs the compiler that that type conforms to the contract described in the documentation, so it can make certain assumptions about how the type will behave and optimizations based on those assumptions. I don't think it actually causes the compiler to generate any code to implement that contract (which is what Model did). All Models were Stable types, but not all Stable types were Models. Eg the Immutable annotation also doesn't cause any different code to be generated, it just declares an even stricter contract than Stable (all Immutable types are Stable types, not all Stable types are Immutable).
☝️ 1
👍 1