user-story
user-story copied to clipboard
Infinite API calls
Describe the bug
Whenever a user clicks on a story to read it, the Story.js
component is rendered, and this makes infinite requests to the backend.
To Reproduce
Steps to reproduce the behavior:
- Right click on homepage and choose
Inspect
- Go to
Networks
tab - Click on any story on the homepage with the inspect section open
- You will see infinite requests made by the client
Expected behavior
The component should make only a single request to the backend and this should be sufficient to return the required data.
Logs
https://user-images.githubusercontent.com/75155230/145693784-ad60fc89-381b-43a4-861e-03e01fbe9c9d.mp4
Environment (please complete the following information):
- OS: Windows 10
- Browser: Chrome
Additional context
NIL
@cyntss
The problem is occurring due to the react-promise-tracker
package. Can I fix it?
@kailash360 I am unable to reproduce this issue. I tried on the hosted link as well as by building user-story repo locally. There are no infinte api calls.
- OS : Ubuntu 20.04
- Browser : Chrome and Brave
Localhost

Local user-story build
I wonder if the problem is occurring only on Windows. I faced this issue in my local server as well as in the build
Nope, I checked for windows as well, on chrome, brave, and edge.