Skip to content

Instantly share code, notes, and snippets.

@michzio
Last active December 12, 2021 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michzio/8d48ee0d4e3af64bc1928905a1e3af2a to your computer and use it in GitHub Desktop.
Save michzio/8d48ee0d4e3af64bc1928905a1e3af2a to your computer and use it in GitHub Desktop.
SwiftUI MVVM architecture - ViewModel protocol
public protocol WordsetCategoriesViewModelInput {
func syncWordsetCategories()
}
public protocol WordsetCategoriesViewModelOutput: ObservableObject {
var error: Error? { get set }
var isLoading: Bool { get set }
}
public protocol WordsetCategoriesViewModelProtocol: WordsetCategoriesViewModelOutput, WordsetCategoriesViewModelInput { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment