ritesh
03/25/2022, 9:46 AMstringResource
and maps from one object to another. I should be marking it as @ReadOnlyComposable
?
More in đź§µritesh
03/25/2022, 9:48 AM@Composable
@ReadOnlyComposable
fun SomeSealedClass.toOtherSealedClass(): OtherSealedClass {
return when (this) {
is SomeSealedClass.Something -> OtherSealedClass.Something(label = stringResource(id = this.stringId))
}
}
ritesh
03/25/2022, 10:00 AMReadOnlyComposable
IMO, to avoid generating groups and all.takahirom
03/25/2022, 12:16 PMFunctions that have a non-unit return value don’t get their own scopes because they can’t be re-executed without also re-executing their caller, so their caller can “see” the new return value computed by the function.
https://dev.to/zachklipp/scoped-recomposition-jetpack-compose-what-happens-when-state-changes-l78
Zach Klippenstein (he/him) [MOD]
03/26/2022, 8:50 PMritesh
03/27/2022, 4:35 AM