This commit is contained in:
Ivan Vorobei
2019-06-26 22:12:35 +03:00
parent 2477f5d038
commit 48001a8e9a
1363 changed files with 6 additions and 3 deletions
@@ -0,0 +1,33 @@
//
// ContentView.swift
// MovieSwift
//
// Created by Thomas Ricouard on 06/06/2019.
// Copyright © 2019 Thomas Ricouard. All rights reserved.
//
import SwiftUI
struct ContentView : View {
@EnvironmentObject var state: AppState
init() {
store.dispatch(action: MoviesActions.FetchPopular())
}
var body: some View {
List {
ForEach(state.moviesState.popular) { id in
Text(self.state.moviesState.movies[id]?.original_title ?? "No title")
}
}
}
}
#if DEBUG
struct ContentView_Previews : PreviewProvider {
static var previews: some View {
ContentView()
}
}
#endif