Created
March 8, 2021 17:58
-
-
Save lammertw/62990652095482065da0ea7f3d3bbdf7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct RestaurantDetailView: View { | |
let viewModel: RestaurantDetailViewModel | |
var body: some View { | |
ObservingView(publisher: asPublisher(viewModel.output), content: InnerView.init) | |
} | |
} | |
private struct InnerView: View { | |
let output: RestaurantDetailViewModelOutput | |
var body: some View { | |
VStack { | |
Text(output.name) | |
Text(output.priceCategory) | |
// etc | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment