Closed pmkod closed 1 year ago
Hi @pmkod - could you provide, by any chance, a bigger chunk of code showing how/where you use useFetch? Codesandbox with a reproducible behavior would be ideal.
I think I know what's happening, you're probably looking for the disable: true
option. fetchOnMount is only applicable for the cases when you have already fetched data and you don't really want to revalidate it in the background. I think we should change it's name to just that: fetchOnMount
-> revalidate
I think I know what's happening, you're probably looking for the
disable: true
option. fetchOnMount is only applicable for the cases when you have already fetched data and you don't really want to revalidate it in the background. I think we should change it's name to just that:fetchOnMount
->revalidate
Ahh okay, thanks
The fetchOnMount option on useFetch don't work correctly. I set the option to false but the request is sent
const { data, success, error, refetch, setData } = useFetch( getSearchSuggestionRequest.setQueryParams({ q: value }), { fetchOnMount: false, } );