Skip to content

useWizard ​

utilities
test coverage
Last changed: last month

Hook that manages a wizard

typescript
import { useWizard } from '@siberiacancode/reactuse';

Usage ​

typescript
const { currentStepId, set, reset, back, history } = useWizard([ { id: 'step1', nodes: ['step2', 'step3'] }, { id: 'step2', nodes: ['step3'] }, { id: 'step3', nodes: [] }, ])

Demo ​

Api ​

Parameters

NameTypeDefaultNote
mapWizardItem<WizardStepId>[]-The map of the wizard
initialStepId?WizardStepId-The initial step id

Source ​

Source • Demo

Contributors ​

Avatardebabin
Avatarhywax

Released under the MIT License.