[Solved] Async Next Screen Presentation in SwiftUI


You can use a presentation button with a binding.

See: https://stackoverflow.com/a/56547016/3716612

struct ContentView: View {
    @State var showModal = false

    var body: some View {
        BindedPresentationButton(
            showModal: $isSignIn,
            label: Text(isSignIn ? "SignIn" : "Next")
                .font(.headline)
                .bold()
                .frame(width: 100)
                .padding(10)
                .foregroundColor(.white)
                .background(Color.blue)
                .cornerRadius(20),
            destination: HomeScreen()
        )
    }
}

4

solved Async Next Screen Presentation in SwiftUI