Costa Fotiadis
Feb 27, 2024

--

Without going into too many details, viewModel::updateState is a method reference while { viewmModel.updateState() } is a lambda.

They both do the same thing, but result in slightly different byte code.

The compose compiler likes method references a bit more, as they are @Stable functional types that definitely remain equivalent between recompositions.

--

--

Costa Fotiadis
Costa Fotiadis

No responses yet