scrollPosition: Int,
scrollRange: Int,
onScrollPositionChange: (Int) -> Unit,
onScrollRangeChange: (Int) -> Unit
The issue I am experiencing with this approach is that now I can not update my viewModel when
"onSomethingHappened"
. I tried adding a callback to my custom state object but it just did not feel right.
Is there a suggestion/best practice about how I can observe changes to my custom state object (and each of the parameters in it)?
a
Adam Powell
03/26/2021, 8:50 PM
If the source of truth lives in your viewmodel, your implementation of the state interface can delegate to that viewmodel