Skip to content

How to push to new route within function? #88

Closed
@robtg4

Description

@robtg4

This doesn't seem to work even though the route is defined. Is this the wrong syntax?

onCreateAcctPress: function() {
        if (this.state.password === this.state.passwordConfirmation)
        {   
            //start to sign up user into parse
            var user = new Parse.User();
                user.set("username", this.state.username);
                user.set("password", this.state.password);
                user.set("email", this.state.username);

                user.signUp(null, {
                  //navigate to new component (.immediatelyResetRouteStack)
                  //when doing so and we pass new views of app (routes)
                  success: (user) => { 
                    Actions.introductions
                    console.log("Successful Signup!"); 
                  },
                  error: (user, error) => { 
                    this.setState({ errorMessage: error.message }); 
                    console.log(error); 
                  }
            });
        } else {
            this.setState({ errorMessage: "Your passwords are not the same!"});
        }
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions