score:0

Inside handleNext function add your logic for calling an API like this:

const [loading, setLoading] = useState(false);
const handleNext = async () => {
  if (localStorage.getItem("SignUpData") === true) {
    // here goes API logic
    setLoading(true);
    const apiRes = await checkStep(data); // store data either in useState or use form library
    setLoading(false);
    if(!apiRes.error){
      setActiveStep(activeStep + 1);
    }
   
  }
};

Related Query

More Query from same tag