¯_(ツ)_/¯
¯_(ツ)_/¯
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import { Stepper, Step } from 'react-js-stepper';
import YourFirstStep from './FirstStep';
import YourSecondStep from './SecondStep';
import YourThirdStep from './ThirdStep';
export default function App() {
return (
<BrowserRouter>
<Stepper>
<Step component={ YourFirstStep } title="FirstStepFromAppComponent"/>
<Step component={ YourSecondStep }/>
<Step component={ YourThirdStep } key="third"/>
</Stepper>
</BrowserRouter>
);
}
clearDataOnUnmount
boolean
default = true
- clear sessionStorage when unmount component
component
key
any props
Your component will receive next props:
stepData
allData
goToStepByKey
saveAndGoToStepByKey
goToPrevStep
saveAndGoToPrevStep
goToNextStep
saveAndGoToNextStep
and any props from Step