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

Fetch calls look doubled #2

Closed
floatingpurr opened this issue Jul 11, 2022 · 2 comments
Closed

Fetch calls look doubled #2

floatingpurr opened this issue Jul 11, 2022 · 2 comments
Labels
question Further information is requested

Comments

@floatingpurr
Copy link

Hi, I'm going over this tutorial. It looks like some fetch calls are doubled. E.g., in v0.7 (and below), this is what you can spot in the network tab of Google Chrome when you open the Blog home page:

image

There are 2 calls to http://localhost:5000/api/feed with an identical content. It seems strange. Why does it happen?

@miguelgrinberg
Copy link
Owner

miguelgrinberg commented Jul 11, 2022

This is new in react 18. It only happens in development builds. See this stack overflow answer for an explanation. Note that this does not happen with production builds.

@miguelgrinberg miguelgrinberg added the question Further information is requested label Jul 11, 2022
@floatingpurr
Copy link
Author

Thank you @miguelgrinberg!

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

No branches or pull requests

2 participants