Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redux Saga API is being called twice yet the action is dispatched only once #3067

Open
huwaizatahir2 opened this issue Sep 15, 2022 · 1 comment

Comments

@huwaizatahir2
Copy link

Description

I have this sign up button, which takes the form data as payload and dispatch the API, the strange thing is the action is only dispatched once but in saga the API is called twice, which in turns sends 2 sign up requests and generates error. Following is code which is responsible for dispatching action

Steps to reproduce

Change language --> sign up --> logout --> sign up again (it will call sign up API twice)

Expected behavior
Change language --> sign up --> logout --> sign up again (it should call sign up API once)

Screenshot
Screenshot 2022-09-15 at 2 35 00 PM

Related Issue
redux-saga/redux-saga#1985

Versions

  • React-Boilerplate: 3.5.0
  • Node/NPM: >= 5
  • Browser: Chrome, Safari
@theumairriaz
Copy link

I think you saga is injected twice.

Check if you have accidently injected Saga with same key twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants