This is a very simple sample app using Flux architecture with Jetpack's LiveData and ViewModel. 🚀
Heavily inspired by https://github.com/mercari/RxRedux
Because an image is worth a thousand words, and you are too busy to read one thousand words:
- Clicks on
-1
button will dispatch aDecreaseCounter
action - Clicks on
+1
button will dispatch aIncreaseCounter
action -1
button is enabled only ifstate.counter > 0
to avoid having negative counter