Radoslaw Juszczyk
01/15/2024, 1:13 PMval items = remember {
initialize items calulcation
}
SideEffect {
update items calculation
}
to make it run only initalize items caluclation
when composing for the first time?efemoney
01/15/2024, 4:19 PMinitialize...
when composing for the first time only. Subsequent compositions will just return the remembered items (until the composable is removed from composition, in which case its remembered state is also removed from from composition/memory)Radoslaw Juszczyk
01/15/2024, 5:46 PMupdate items calculation
when composing for the first timeefemoney
01/17/2024, 2:54 PMcurrentComposer.inserting
or something, although <-- that is not recommended. You can also maintain state in composition that is updated from the side effectefemoney
01/17/2024, 2:56 PMval abc by remember { mSO(false) }
SideEffect {
if (!abc) abc = true else update items
}