-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Describe the bug
When fetching a query offline and using @react-native-community/netinfo as a custom event listener the prop isFetching is always true and the prop status is success even though the request hasn't started yet.
To Reproduce
Just follow the docs here and set up onlineManager with @react-native-community/netinfo
Then when you query something:
const {
data,
isError,
isFetching,
isLoading,
status,
} = useQuery('todos', MyAPI.getAll, {
placeholderData: []
});isFetching will be always true when there's no internet.
Expected behavior
It should be false since the request hasn't started yet I guess?
bombillazo, alonzuman, scarlac, jmcabelloquispe, snehalbaghel and 2 more