Skip to content

Commit cd2bcc0

Browse files
committed
chore: add more semantic state update
1 parent b34250e commit cd2bcc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wizard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const Wizard: React.FC<WizardProps> = React.memo(
2323

2424
const previousStep = React.useCallback(() => {
2525
if (hasPreviousStep.current) {
26-
setActiveStep((prev) => prev - 1);
26+
setActiveStep((activeStep) => activeStep - 1);
2727
}
28-
}, [setActiveStep]);
28+
}, []);
2929

3030
// Callback to attach the step handler
3131
const handleStep = React.useCallback((handler: Handler) => {

0 commit comments

Comments
 (0)