Assigned
Status Update
Comments
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com>
al...@google.com <al...@google.com> #2
Triage notes: Still P3, still a real issue. Compat issue.
Description
Jetpack Compose version: March 2023 BOM
Jetpack Compose component(s) used: Compiler 1.4.4
Android Studio Build: N/A
Kotlin version: 1.8.10
Steps to Reproduce or Code Sample to Reproduce:
Passing an extension property reference triggers recomposition of the callee whenever the caller recomposes. By contrast, this is not true when passing an extension function reference. Marking the property getter
@Stable
does not help, either.If the extension property behavior cannot be improved, then a Lint rule needs to be added warning about using inefficient extension property reference usages as opposed to using an equivalent lambda instead, which does not suffer from this problem.
Core repro below, complete repro project athttps://github.com/bubenheimer/composeextensionpropertyrecomposition