The definition of the ViewModel not containing reference to the view also applies to MVI.

When familiarizing myself with MVI I recognized the FeedView interface naming is confusing. The FeedView interface passes the intent or action Flows to the ViewModel, and renders the view state data back to the view. It is only a “view” in the naming convention. No views, resources, context, etc. should be passed through the FeedView interface.

It represents the contract between the view and the ViewModel. I’m open to considering moving away from existing MVI examples’ naming conventions, in favor of a name that causes less confusion. Perhaps FeedViewContract, FeedContract, FeedRenderContract



Open Sourcer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store