Skip to content

Should't the initVM be before the initView? #2

@jacobmohl

Description

@jacobmohl

I have just read your excellent blog about a simple path to begin with MVVM and also looked at you tutorial repo here.

I where just wondering if the initialization of the view model should be before the initialization of the view. What if the initView rely on some of the closures not yet set.

I had some code which can so quickly that the closures (in initViewModel) where not yet set. Is there any danger in setting the closures as the first thing in viewDidLoad?

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