Module

useQueryData

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 true, retries infinitely. If false, never retries. If a number, retries that many times

View Source useQueryData.jsx, line 6

UseQueryResult