marcinmoskala
12/11/2024, 10:30 AMStylianos Gakis
12/11/2024, 10:53 AMmarcinmoskala
12/11/2024, 10:54 AMmarcinmoskala
12/11/2024, 10:54 AMmarcinmoskala
12/11/2024, 10:55 AMStylianos Gakis
12/11/2024, 10:55 AMremember would be a good example I thinkmarcinmoskala
12/11/2024, 10:56 AMmarcinmoskala
12/11/2024, 10:57 AMStylianos Gakis
12/11/2024, 10:59 AMmarcinmoskala
12/11/2024, 11:01 AMmarcinmoskala
12/11/2024, 11:02 AMmarcinmoskala
12/11/2024, 11:03 AMAlbert Chang
12/11/2024, 11:24 AM@Composable
fun Screen(
text: String,
list: List<String>,
) {
Column {
Text(text)
List(list)
}
}
@Composable
fun List(
list: List<String>,
) {
LazyColumn(list)
}
When text changes, the whole Screen, including List, will be recomposed, and List can only be skipped if strong skipping mode is enabled.Albert Chang
12/11/2024, 11:26 AMmarcinmoskala
12/11/2024, 11:32 AMgmz
12/11/2024, 12:08 PMand stable first with ===, and if it returns true by ==if
=== returns true, then there is no point in doing also ==, given that === is stronger than ==. Usually the instance equality check is the first line of a proper equals() implementation (and probably the runtime never checks stable types with ===, but only ==)