Hello, I have been exploring Jetpack Compose and ...
# compose
m
Hello, I have been exploring Jetpack Compose and encountered an interesting behavior related to interfaces and data classes. Specifically, I declared an interface and implemented it using an unstable data class. Here's the scenario: When I remember an object of the data class with the type of the interface, Jetpack Compose treats it as a stable object. However, when I remember the same object with the data class type itself, Jetpack Compose treats it as an unstable entity. My question is whether interfaces are inherently considered stable in Jetpack Compose by default, or if there are any specific factors that determine the stability of interfaces in this context.
d
IIRC they shouldn't be. perhaps you can come up with a minimal example one could look at?
a
An interface is only considered stable if it is marked as
@Stable
.