hyper-fetch icon indicating copy to clipboard operation
hyper-fetch copied to clipboard

[React] `refetchOnFocus` is ignoring `disabled`

Open Foprta opened this issue 8 months ago • 1 comments

Describe the bug useFetch with refetchOnFocus is ignoring disable prop.

To Reproduce Steps to reproduce the behavior:

  1. make a useFetch with disabled: true and refetchOnFocus: true
  2. refocus tab

Expected behavior It doesn't make a request, since it is disabled

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Brave
  • Version: [Version 1.76.74 Chromium: 134.0.6998.89 (Official Build) (arm64)]

Additional context Moreover it starts refreshing cycle if refresh: true ignoring disabled state completely

Foprta avatar Apr 12 '25 07:04 Foprta

Thank you for reporting, I will handle this 👌

prc5 avatar Apr 16 '25 06:04 prc5