- Published on
React 18 useEffect Double Call for APIs - Emergency Fix
- Authors
- Name
- Lucas Floriani
- @lucasfloriani13
React 18 useEffect Double Call for APIs - Emergency Fix
React 18 useEffect Double Call for APIs - Emergency Fix
Use an Abort Controller
Still makes 2 API calls but at least it aborts the first one
Use react-query
It will deal with this issue and will bring a good amount of other benefits for your codebase