Nick
10/22/2021, 4:16 PMval buttonStateValue = myViewModel.buttonState.collectAsState().value
MyScreen(buttonStateValue)
....MyScreen consumes the buttonStateValue, and passes it down to a bunch of other composables
Casey Brooks
10/22/2021, 4:24 PMgetValue()
extension delegate is doing under the hood. There's functionally no difference.
But you can save yourself a .value
by using the delegate, which looks a bit cleaner: val buttonStateValue by myViewModel.buttonState.collectAsState()
Nick
10/22/2021, 5:40 PM