https://kotlinlang.org logo
#compose
Title
# compose
v

Vaibhav Jaiswal

02/21/2024, 12:00 PM
I am trying to debug recompositions using Rebugger, and I am seeing that my composable is recomposing due to a lambda instance
Copy code
`onRefresh` instance changed, but content remains the same -> `function refresh (Kotlin reflection is not available)`
But I'm passing the lambda as a function parameter, which should not be created new Lambda Function instance If I'm not wrong
replies
here is a
LazyPagingItem<T>
. I'm using Compose Multiplatform and using Cash App Paging library for Paging3
Copy code
BaseScreenContent(
    component = component,
    onRefresh = replies::refresh,
    onRetry = replies::retry
)
s

shikasd

02/22/2024, 12:51 PM
It does create a new reference each time
v

Vaibhav Jaiswal

02/22/2024, 12:52 PM
@shikasd any way around this? As its always recommended to use function reference rather than creating lambdas Is it the Cash App Paging Library's fault?
s

shikasd

02/22/2024, 12:55 PM
I think it is mostly a stability problem, you can try enabling strong skipping mode to workaround this problem
v

Vaibhav Jaiswal

02/22/2024, 1:02 PM
@shikasd any guide on how to enable it?
v

Vaibhav Jaiswal

02/22/2024, 1:03 PM
Thanks
8 Views