hello, maybe somebody have answer to this: Is it r...
# compose
t
hello, maybe somebody have answer to this: Is it risky adding @Immutable to an existing data class because we start using it in Compose ?
s
What do you mean by “risky”?
t
like on old usages will it cause crash or will it change their behavior somehow ?
s
What is “old usages” in this context? If you are adding
@Immutable
to a class that is in fact @Immutable, aka doesn’t break the contract that it needs to follow to be described as immutable, then I don’t see a reason why adding it yourself would be problematic. But I may be missing some context in what you mean with “old usages”.
s
Annotating with
@Immutable
should not break existing non-Compose usages, no. It's a contract between you and the Compose Compiler.