theapache64
09/23/2021, 9:45 AM@Stable
and @StableMarker
? 🤔🧵Csaba Kozák
09/23/2021, 9:50 AM@StableMarker
is a meta-annotation, which is added to annotations which indicate a stability of a type. Apps should not use it directly i think. 🙂yousefa2
09/23/2021, 9:54 AM@StableMarker
is applied to other annotations to indicate that any type annotated with this other annotations is stable.
@Stable
annotation is in itself annotated with @StableMarker
Stability means:
• Calls to equal has the same result of any two instances with the same content
• Composition is aware when public properties change
• All public properties of the annotated type is stable
Source
Jetpack compose internals book by Jorge Castillo and Andrei Shikovtheapache64
09/23/2021, 9:56 AM