gitdagray / react_jwt_auth

478 stars 211 forks source link

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

Open hsmptg opened 3 months ago

hsmptg commented 3 months ago

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 commented 1 week ago

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