@Composable
fun KonfettiView(
modifier: Modifier = Modifier,
parties: List<Party>,
updateListener: OnParticleSystemUpdateListener? = null
)
The KonfettiView composable is non-skippable and non-restartable because the parties parameter is unstable, as well as OnParticleSystemUpdateListener
Soluiton:
Replace update listener with a lambda using rememberUpdatedState and wrap List<Parties> in an object that is marked as @Immutable
This issue has a serious performance impact as ConfettiView is being recomposed every time unrelated parameters change.
The KonfettiView composable is non-skippable and non-restartable because the
partiesparameter is unstable, as well asOnParticleSystemUpdateListenerSoluiton:
Replace update listener with a lambda using
rememberUpdatedStateand wrapList<Parties>in an object that is marked as@ImmutableThis issue has a serious performance impact as ConfettiView is being recomposed every time unrelated parameters change.