youssef hachicha
07/04/2024, 11:24 AMCompositionLocal
for concepts that aren't thought as tree-scoped or sub-hierarchy scoped. A CompositionLocal
makes sense when it can be potentially used by any descendant, not by a few of them.
but in my case these params/states are heavily used across almost all of the child composabels.
I was wondering is there any downside for this approach ?Stylianos Gakis
07/04/2024, 11:26 AMyoussef hachicha
07/04/2024, 12:06 PMStylianos Gakis
07/04/2024, 12:42 PMyoussef hachicha
07/04/2024, 12:58 PMval customClass = remember(keys){mutableStateOf(CustomClass(...)}
but since the keys I am passing are state coming from my viewModel in case of a configuration change my customClass will persist because the keys I am passing to the remember are state coming from the viewModel.
i guess I am just confused and I don't need a custom saverStylianos Gakis
07/04/2024, 1:54 PMmutableState
as you are doing there.