skip to Main Content

On submits doesn't trigger a function in ReactJs

const CreateMessage = () => { const disatch = useDispatch() const chatR = useSelector(state => state.chat); const { chat } = chatR; const [text, setText] = useState("") useEffect(()=>{ setText("") },[chat]) function handleSubmit(event) { event.preventDefault() console.log(3333) } return ( <StyledCreateMessage id="myform"…

VIEW QUESTION
Back To Top
Search