Rolbin
03/17/2021, 4:01 PMFilip Wiesner
03/17/2021, 4:44 PM@Composable
annotation marks a function that is changed by the compiler plugin. On the other hand inline
functions are removed by the compiler (and substituted with the corresponding implementation in the call site). Plus the functions are used for identity and are re-called every recomposition so you need reference to it (which you wouldn't have if you remove it during compilation)
Disclaimer: That's just my naive reasoning 🙂 I don't know enough about the compose compiler plugin to answer thatFilip Wiesner
03/17/2021, 4:46 PMinline
as
@Composable inline fun Button(onClick: () -> Unit) { ... }
Rolbin
03/18/2021, 9:41 AMfal
03/18/2021, 9:31 PM