Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVVM Isuue #76

Open
evyasafhouzz opened this issue Nov 24, 2019 · 1 comment
Open

MVVM Isuue #76

evyasafhouzz opened this issue Nov 24, 2019 · 1 comment

Comments

@evyasafhouzz
Copy link

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> ?

@sergdort
Copy link
Owner

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 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants