1

I am using the following code to execute the createUser method, which updates var self.auth.user (a user's ID). I am trying to pass self.auth.user to ProfileBuilderView after it has been updated.

NavigationLink(destination: ProfileBuilderView(userId: self.auth.user)) {
                    Text("Sign Up")
                        .fontWeight(.heavy)
                }.simultaneousGesture(TapGesture().onEnded{
                    self.auth.createUser(email: self.email, password: self.password)
                })

Right now, createUser is triggered after navigation, and the previous user's Id is passed to ProfileBuilderView. Is there a way to fix this?

seth.eeee
  • 439
  • 5
  • 12

0 Answers0