Open Nek-12 opened 9 months ago
@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
parties
OnParticleSystemUpdateListener
Soluiton: Replace update listener with a lambda using rememberUpdatedState and wrap List<Parties> in an object that is marked as @Immutable
rememberUpdatedState
List<Parties>
@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
parties
parameter is unstable, as well asOnParticleSystemUpdateListener
Soluiton: Replace update listener with a lambda using
rememberUpdatedState
and wrapList<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.