title: swiftUI: Navigate to Home screen after Login Completed. Navigating Views by Button click
body: <p>I'm doing a sign-in screen. after the sign-in button click, I'll do an API call on the response I will redirect the user to home screen.</p>
  
  <p>Q - How to navigate from one View to Another by a button click with some action.</p>
  
  <p>I've tried this, 
  <a href="https://stackoverflow.com/questions/56754117/programatically-navigate-to-new-view-in-swiftui">Programatically navigate to new view in SwiftUI</a></p>
  
  <p>But I'm getting an error like,</p>
  
  <p>"Function declares an opaque return type, but has no return statements in its body from which to infer an underlying type"</p>
  
  <p>Please help me to resolve it.</p>