score:1

const Form = () => {
    const [name,setName] = useState("");
    const [email,setEmail] = useState("");
    const [message,setMessage] = useState("");
    const [sent,setSent] = useState(false);

    const formSubmit=(e)=>{
        e.preventDefaults();

        let data = {
            name:name,
            email:email,
            message:message
        }

    }
} 

score:1

function formSubmit(e) {
    e.preventDefault();

    let data = {
      name: name,
      email: email,
      message: message,
    };
  }

Related Query

More Query from same tag