Custom Hook that uses React-Query to fetch and cache data, using the URL as the query key
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
endpoint |
string
|
||
options |
object
|
<optional> |
|
staleTime |
number
|
<optional> |
Time by which the data goes stale and must be recalled, in ms |
retry |
number
|
<optional> |
If |
UseQueryResult