1.0.3 • Published 8 months ago

use-multi-step-form v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

react-multi-step-form

Getting Started

Follow the instruction given bellow

npm install use-multi-step-form

Example

import React, { useState } from 'react'
import {useMultistepForm} from 'use-multi-step-form';
import Form1 from "./Form1";
import Form2 from "./Form2";
import Form3 from "./Form3";


const MyComponent = () => {
    const {
    next,
    back,
    step,
    isLastStep,
    isFirstStep
    } = useMultistepForm([<Form1/>,<Form2/>,<Form3/>]);


    const Submit = ()=>{
        if(!isLastStep){
            next()
            }}

    return (  <div>
          {step}
          {!isFirstStep &&<button onClick={back}>Back <button/>}
          <button onClick={Submit}>Next <button/>
          </div>
    )
}
1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

9 months ago