-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hello, I use wizard with redux saga to call api by axios for using backend server.
It worked, but click finish button calling api twice.
my pseudo code is like below:
`import { useDispatch } from "react-redux";
import {register} from "modules/utility";
const UtilityWizard = () => {
const dispatch = useDispatch()
const finishButtonClick = allStates => {
dispatch(register({form:"createutilityItem", key:"name", value:allStates.About.firstname}))
};
return (
<div className="content">
<Col className="mr-auto ml-auto" md="10">
<ReactWizard
steps={steps}
navSteps
validate
title="utilitywizard"
description="This information will let us know more about you."
headerTextCenter
finishButtonClick={finishButtonClick}
finishButtonClasses="btn-wd btn-info"
nextButtonText="next"
nextButtonClasses="btn-wd btn-info"
previousButtonClasses="btn-wd"
progressbar
color="blue"
/>
</Col>
</div>
);
};`
I cannot figure out why dispatching axios calling twice.
Is there any solution for this issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels