A TMDb SwiftUI View and View Model wrapper using TMDbMovieKit Library
- Add the dependency to your target/project using Swift Package Manager
- Import framework in your source
- MovieListViewModel: an Observable Object that publishes movies, error, and isLoading propery. trigger fetching by invoking loadMovies passing the endpoint
- MovieViewModel: an Observable object that publishes movie, error, and isLoading property. trigger fetching by invoking loadMovie passing the movieId
- MovieListView: A SwiftUI List wrapping the MovieListViewModel
- MovieView: A SwiftUI View wrapping the MovieViewModel