“FormData” Respostas de código

FormData

  const fd = new FormData();
    fd.append("email", data.username);
    fd.append("password", data.password);
Blue Baboon

FormData

const handleSubmit = async (e) => {
    e.preventDefault();
    const { userName, firstName, lastName, wallet_address, email, password } =
      data;
    try {
      let fd = new FormData();
      fd.append("userName", userName);
      fd.append("firstName", firstName);
      fd.append("lastName", lastName);
      fd.append("wallet_address", wallet_address);
      fd.append("email", email);
      fd.append("password", password);
      const res = await getSignUp(fd);
      console.log(res);
      window.alert(`${res.data.message}`);
    } catch (err) {
      window.alert(`${err}`);
      navigate("/signin");
    }
  };
Blue Baboon

Respostas semelhantes a “FormData”

Perguntas semelhantes a “FormData”

Procure respostas de código populares por idioma

Procurar outros idiomas de código