DEV Community 👩‍💻👨‍💻

Discussion on: React Hooks Noob, please help...

chico1992 profile image

Do you have a code snippet or a repo you can show as without code it's pretty hard to help you
I could guess that you're using some sort of library(apollo) for graphql if this is the case something like the following should work

const SubmitForm = () =>{
    const [mutation] = useMutation();
        <form onSubmit={()=>{mutation()}}>
            {/* some more components here */}

this is in no way working code but the usage should be clear