Skip to content

How does ViewModel get the Model? #1

Open
@MikeWarren2014

Description

@MikeWarren2014

I love how simple and intuitive this is, namely how you implemented ViewModel in a way that we won't have to butcher the React Components by passing in a ...ViewModel prop. It's a lot better than what my manager is making us all do. However, I don't get what we should do if the Model is a class (like it is in our scenario at work). I'm taught the model is the shape of the data + some API-hitting methods to mutate it (this is enforced at work). Could you produce an example of a class-based Model, so that I can see what this would look like?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions