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

axiosPrivate.get('/users') error #11

Open
hsmptg opened this issue Aug 7, 2024 · 1 comment
Open

axiosPrivate.get('/users') error #11

hsmptg opened this issue Aug 7, 2024 · 1 comment

Comments

@hsmptg
Copy link

hsmptg commented Aug 7, 2024

Hi
I just am able to run the code without errors if I comment the signal inside the axiosPrivate.get of Users.js:

const response = await axiosPrivate.get('/users'
   // , { signal: controller.signal }
);   

Any idea why?
Regards

@DavidCebzan
Copy link

The issue is likely due to running the app in Strict Mode, which causes React to render components twice in development, triggering the useEffect cleanup function and aborting the request prematurely. Try commenting out Strict Mode in index.js temporarily to see if this resolves the problem.

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