Horje
implementating step component in react Code Example
implementating step component in react
//1. Implementing 2 steps in Login using hashmap
// frontend\src\pages\Login\Login.jsx

import StepPhoneEmail from '../Steps/StepPhoneEmail/StepPhoneEmail';
const steps = {
    1: StepPhoneEmail,
    2: StepOtp,
};

const Login = () => {
    const [step, setStep] = useState(1);
    //select component according to step 
    const Step = steps[step];

    function onNext() {
        setStep(step + 1);
    }

    return <Step onNext={onNext} />;
};




Javascript

Related
loopback server.post response unauthorized Code Example loopback server.post response unauthorized Code Example
salut Code Example salut Code Example
js does array.map maintain the order Code Example js does array.map maintain the order Code Example
how to get data from ipfs Code Example how to get data from ipfs Code Example
delete node modules from multiple projects Code Example delete node modules from multiple projects Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8