Peter
08/23/2023, 6:50 AMButton(onClick = { vm.onClick() })
// vs
Button(onClick = vm::onClick)
Jakub Syty
08/23/2023, 7:16 AMAlbert Chang
08/23/2023, 10:40 AMAlbert Chang
08/23/2023, 10:42 AMTo sum up, the difference between lambda and method reference is that when we use method reference, the instance of variable, the method of which we use, is fixed at the moment the reference is created, not when it is called, unlike what happens when lambda is used.