KakaoCup / Compose

Nice and simple DSL for Espresso Compose UI testing in Kotlin
https://kakaocup.github.io/Compose/
Apache License 2.0
146 stars 15 forks source link

Don't suggest to use non composable lambda #97

Closed kozaxinan closed 2 months ago

kozaxinan commented 3 months ago

Non composable extension functions are cause composition skip. Since lambdas are not remembered, using helper extension functions prevents compose runtime to skip.

Either extensions can be @Composable to bring lambda memorization to extension, or inline the semantic calls. I preferred inline option as @Composable is not required, it can be easily removed if anyone ones to clean up.

This sample will suggest a code that wont Compose runtime can skip and wont cause performance issues.

Vacxe commented 2 months ago

Thanks for the contribution!

kozaxinan commented 2 months ago

Thanks for the contribution!

Thank you. After changing the base, there are new commits in this pr. Is that okay?