Closed kypeli closed 2 years ago
That's because the ones that you call from MavericksView are here. They should just work though and if you are having issues, it's likely specific to your project. https://github.com/airbnb/mavericks/blob/main/mvrx/src/main/kotlin/com/airbnb/mvrx/MavericksView.kt#L300
Thanks for the comment! Android Studio suggested the protected version by default and could not pick up the extension function on the view model. Overriding the arguments picked up the correct function.
Leaving this as a comment if others have difficulties with this just based on reading the docs.
In the Mavericks documentation here it shows how we can listen for property state changes using
onAsync
from the viewModel.However, in latest Mavericks version,
onAsync
andonEach
are protected so they cannot be called from the Fragment which is the consumer of the view model. I don't understand the documentation in this case.Sample code: