Skip to content

StaleTime is bypassed when using refetch  #960

@TomPradat

Description

@TomPradat

Describe the bug

refetch always forces a XHR query even if data is not stale

To Reproduce

https://codesandbox.io/s/flamboyant-browser-42fgy?file=/src/index.js

If you click on the button, it'll cause the useQuery to refetch and send an XHR query in the browser

Expected behavior

I'd expect the cached data to be used in this case

Desktop (please complete the following information):

  • OS: [OS X]
  • Browser: [chrome]
  • Version: [Version 85]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions