Stylianos Gakis
02/27/2024, 11:51 PMBen Trengrove [G]
02/27/2024, 11:58 PMStylianos Gakis
02/28/2024, 12:02 AMLukasz Kalnik
02/28/2024, 8:47 AMList
implementations (or probably a data class
with a var
as well) compared using referential equality? The contents of a (mutable) List
might have changed (a var
as well), although the instances would still be the same.Stylianos Gakis
02/28/2024, 8:51 AMMutableState
has already and will forever be a source of bugs in compose anyway.
It is the same as using lists that are internally mutating, compose would have no way to be able to understand those changes anyway. Which is also why SnapshotStateList
exists in the first place.Lukasz Kalnik
02/28/2024, 8:52 AMLukasz Kalnik
02/28/2024, 8:53 AMLukasz Kalnik
02/28/2024, 8:53 AMStylianos Gakis
02/28/2024, 8:53 AMLukasz Kalnik
02/28/2024, 8:54 AMLukasz Kalnik
02/28/2024, 8:55 AMStylianos Gakis
02/28/2024, 8:57 AMLukasz Kalnik
02/28/2024, 10:13 AMWe took a conservative approach to recomposition, we believed in the case where we don’t know if the inputs to a composable have changed (because they are unstable and their mutations are not tracked by the compose runtime), we should never skip. Yes, this may be slightly less performant but it will mean the app always shows the correct state, which is the most important factor for the end user.
Lukasz Kalnik
02/28/2024, 10:14 AMLukasz Kalnik
02/28/2024, 10:15 AMStylianos Gakis
02/28/2024, 10:19 AMBen Trengrove [G]
02/28/2024, 10:37 PM