/MVVM-Router

use MVVM Architecture with adding Router component which responsible of how routing done

Primary LanguageSwiftMIT LicenseMIT

MVVM-Router

Sample of MVVM Architecture with adding Router component.

App Navigation

  • Login Screen -> Home Screen passing username
  • Login Screen -> Reset Password Screen

Router Role

When the user taps the next button to navigate to the next scene in the storyboard, a segue is trigged and a new view controller is presented. A router extracts this navigation logic out of the view controller. It is also the best place to pass any data to the next scene. As a result, the view controller is left with just the task of controlling views.

Reference

  • https://clean-swift.com/clean-swift-ios-architecture/
  • https://medium.com/commencis/routing-with-mvvm-on-ios-f22d021ad2b2