I am new in React-Js,I have a register page that i want to send a Post request to my backend . UseState is working andeverything else,my method is handleSubmit .How do is use useEffect from here either by using axios or fetch?
export default function SignUp() {
const [username, setUsername] = useState('');
const [email, setEmail] = useState('');
const [passowrd, setPassowrd] = useState('');
const handleSubmit = e => {
e.preventDefault();
}
return (
<form className={classes.form} noValidate onSubmit={handleSubmit}>
</>
)
useEffect? Isn't the trigger condition "When the form is submitted"?