title: SwiftUI passing data into ViewModel
body: <p>I am trying to put the data that I am passing into the view into the ViewModel.</p>
  <p>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.</p>
  <p>I have to do a lot of calculations on the data to get my final output.</p>
  <p>here I need to get 'entry' into the ShowViewModel.</p>
  <pre><code>struct ShowView: View {
    
      @ObservedObject var entry:EntryData
   
      var showVM = ShowViewModel()
   
      var body: some View {
     
         Text(&quot;\(entrybeg)&quot;)
      
      }
  }
  </code></pre>
  <p>I am just playing with a blank ViewModel here for testing.</p>
  <pre><code>class ShowViewModel: ObservableObject {
  
      @Published var test = &quot;something&quot;
      @Published var m:Month = Month()
  
  }
  </code></pre>