Reactjs – react form submits every time state changes
So I've got a form which sends formData to api, goes like this: const [state, setState] = useState(true) const handleSubmit = async e => { const destination = state ? true : false // Sends FormData to api } return…