Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
283 B
4
Indexable
Never
const Homepage = () => {
  const [step, setStep] = useState(1);

  const prevStep = () => {
    setStep((prev) => prev - 1);
  };

  const nextStep = () => {
    setStep((prev) => prev + 1);
  };

  switch (step) {
    case 1:
      <StepOne />;
    case 2:
      <StepTwo />;
  }
};