sergdort / CleanArchitectureRxSwift

Example of Clean Architecture of iOS app using RxSwift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MVVM Isuue

evyasafhouzz opened this issue · comments

PostsViewModel is exposing to the view the Post mode as output: let selectedPost: Driver<Post>

My question is:
PostsViewController knows Post data model which means that the view knows the model.
As far as I understand MVVM architecture the UI (view) doesn't need to know the model
(Post).

What do you think? is there a place to change the selectedPost parameter to be:
let selectedPost: Driver<PostViewModel> ?

Yeah definitely, I am just being lazy here 🙈because there is no formatting involved before rendering information in a view.

In this case it would be literally one to one mappings of properties 🤷‍♂️