I am trying to put the data that I am passing into the view into the ViewModel.
I see lots of tutorial about retrieving data from outside sources like Json or Firebase but nothing about using my data passed from the previous page.
I have to do a lot of calculations on the data to get my final output.
here I need to get 'entry' into the ShowViewModel.
struct ShowView: View {
@ObservedObject var entry:EntryData
var showVM = ShowViewModel()
var body: some View {
Text("\(entrybeg)")
}
}
I am just playing with a blank ViewModel here for testing.
class ShowViewModel: ObservableObject {
@Published var test = "something"
@Published var m:Month = Month()
}


