Skip to content

finish button call redux saga twice  #36

Description

@log901108

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions