score:0

you can use a usestate variable and set result to it after calling checkchanges()


const [valid, setvalid] = usestate(false);

const checkchanges = () => {
   // takes email value from state
   // checks if it's valid
   return setvalid(result) // true or false after validating
}

 
return (<button onclick={() => savechanges()} disabled={!valid}>click me</button>) {/* disable if not valid*/}

Related Query

More Query from same tag