useQuery runs twice on initial load with React 18 #3633
Closed
Description
Describe the bug
Using axios, if you pass the signal parameter, the api call runs twice (cancelling the first) on page reload.
I think that is the same bug that: ##3492
Your minimal, reproducible example
https://codesandbox.io/s/funny-sid-odqlqr?file=/src/App.js
Steps to reproduce
Open the network tab, refresh the Browser output and see two API calls(one cancelled).
Expected behavior
Only one api call.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
...
react-query version
v4.0.0-beta.1
TypeScript version
No response
Additional context
No response
Metadata
Assignees
Labels
No labels
Activity