Hi everyone. I’m not sure if it’s asked before but...
# compose
Hi everyone. I’m not sure if it’s asked before but I couldn’t find the exact answers I’m looking for. unstable does not necessarily mean it is not skippable, right? I read these articles https://medium.com/androiddevelopers/jetpack-compose-stability-explained-79c10db270c8 https://chris.banes.dev/composable-metrics/ and they say:
“A composable function is ‘skippable’ if Compose determines that it can completely skip calling a function”
“if Compose can’t be sure, it will always be recomposed when its parent composable is recomposed.”
From those, I understand as compose will do recomposition if a parameter is defined as unstable but what I experienced was a bit different. I run compose metrics and have this output for a composable:
Copy code
restartable skippable scheme("[androidx.compose.ui.UiComposable]") fun DummyScreen(
  stable id: String
  stable onClick: Function1<Boolean, Unit>
  stable modifier: Modifier? = @static Companion
  unstable style: DummyStyle? = @dynamic Companion.Default
  unstable viewModel: DummyViewModel? = @dynamic hiltViewModel(null, $composer, 0, 0b0001)
Even though parameters are unstable, composable itself is marked as skippable. Is this expected?
👀 1