Join Slack
Communities
Powered by
Can I access the current state from the view model...
# ballast
r
Robert Jaros
12/14/2022, 4:04 PM
Can I access the current state from the view model?
c
Casey Brooks
12/14/2022, 4:07 PM
If you have a reference to the ViewModel object, you can get the current state with
vm.observeStates().value
since it’s a StateFlow. Otherwise, you can get it from
getCurrentState()
within the InputHandler.
5
Views
Open in Slack
Previous
Next