Skip to content

(MVI) Code Summary

Devrath edited this page Jun 8, 2021 · 5 revisions

----- In Progress

MVI - A MVVM done right 😊

  • MVI architecture is a bit more involved compared to other architectures.
  • This is very true when implementing more things in projects like a repository, making network requests etc.
  • MVI helps in organizing your application in a highly structured way in real-world cases.

Step-1 : Consider defining Entities

INTENT <----------------> ACTION <----------------> RESULT <----------------> STATES

  • INTENT ---> User initiates the intent.
  • ACTION ---> Intent causes an action.
  • ACTION ---> Action results in state.
  • Each state is represented by the things it does.
  • So for each state we have an interface.
    • View provides intents to the view model
    • ViewModel holistically processes the intents and emits the states that a view can receive.
    • Finally ViewModel renders the results to the view

Clone this wiki locally