The props object
Optionaladdress?: `0x${string}`Optional address to fetch balances for
Optional address to fetch balances for
Only show balances from offers created by this user's address
Only show balances from offers funded by this budget account
Only show balances from offers with actions that target this contract address. If specifying, you must also specify chainId
Only show balances from offers with actions that target a contract on this chain ID. You must specify this if also specifying targetContract
Query result enhanced with filtered balances
The last successfully resolved data for the query.
The error object for the query, if an error was thrown.
null.A derived boolean from the status variable, provided for convenience.
true if the query attempt resulted in an error.Will be pending if there's no cached data and no query attempt was finished yet.
Is true whenever the first fetch for a query is in-flight.
isFetching && isPending.Will be true if the query failed while fetching for the first time.
Will be true if the query failed while refetching.
A derived boolean from the status variable, provided for convenience.
true if the query has received a response with no errors and is ready to display its data.Will be true if the data shown is the placeholder data.
The status of the query.
pending if there's no cached data and no query attempt was finished yet.error if the query attempt resulted in an error.success if the query has received a response with no errors and is ready to display its data.The timestamp for when the query most recently returned the status as "success".
The timestamp for when the query most recently returned the status as "error".
The failure count for the query.
0 when the query succeeds.The failure reason for the query retry.
null when the query succeeds.The sum of all errors.
Will be true if the query has been fetched.
Will be true if the query has been fetched after the component mounted.
A derived boolean from the fetchStatus variable, provided for convenience.
true whenever the queryFn is executing, which includes initial pending as well as background refetch.A derived boolean from the fetchStatus variable, provided for convenience.
paused.Is true whenever a background refetch is in-flight, which does not include initial pending.
isFetching && !isPending.Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.
A function to manually refetch the query.
The fetch status of the query.
fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch.paused: The query wanted to fetch, but has been paused.idle: The query is not fetching.A stable promise that will be resolved with the data of the query.
Requires the experimental_prefetchInRender feature flag to be enabled.
const client = new QueryClient({
defaultOptions: {
queries: {
experimental_prefetchInRender: true,
},
},
})
import { useQuery } from '@tanstack/react-query'
import React from 'react'
import { fetchTodos, type Todo } from './api'
function TodoList({ query }: { query: UseQueryResult<Todo[], Error> }) {
const data = React.use(query.promise)
return (
<ul>
{data.map(todo => (
<li key={todo.id}>{todo.title}</li>
))}
</ul>
)
}
export function App() {
const query = useQuery({ queryKey: ['todos'], queryFn: fetchTodos })
return (
<>
<h1>Todos</h1>
<React.Suspense fallback={<div>Loading...</div>}>
<TodoList query={query} />
</React.Suspense>
</>
)
}
The last successfully resolved data for the query.
The error object for the query, if an error was thrown.
null.A derived boolean from the status variable, provided for convenience.
true if the query attempt resulted in an error.Will be pending if there's no cached data and no query attempt was finished yet.
Is true whenever the first fetch for a query is in-flight.
isFetching && isPending.Will be true if the query failed while fetching for the first time.
Will be true if the query failed while refetching.
A derived boolean from the status variable, provided for convenience.
true if the query has received a response with no errors and is ready to display its data.Will be true if the data shown is the placeholder data.
The status of the query.
pending if there's no cached data and no query attempt was finished yet.error if the query attempt resulted in an error.success if the query has received a response with no errors and is ready to display its data.The timestamp for when the query most recently returned the status as "success".
The timestamp for when the query most recently returned the status as "error".
The failure count for the query.
0 when the query succeeds.The failure reason for the query retry.
null when the query succeeds.The sum of all errors.
Will be true if the query has been fetched.
Will be true if the query has been fetched after the component mounted.
A derived boolean from the fetchStatus variable, provided for convenience.
true whenever the queryFn is executing, which includes initial pending as well as background refetch.A derived boolean from the fetchStatus variable, provided for convenience.
paused.Is true whenever a background refetch is in-flight, which does not include initial pending.
isFetching && !isPending.Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.
A function to manually refetch the query.
The fetch status of the query.
fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch.paused: The query wanted to fetch, but has been paused.idle: The query is not fetching.A stable promise that will be resolved with the data of the query.
Requires the experimental_prefetchInRender feature flag to be enabled.
const client = new QueryClient({
defaultOptions: {
queries: {
experimental_prefetchInRender: true,
},
},
})
import { useQuery } from '@tanstack/react-query'
import React from 'react'
import { fetchTodos, type Todo } from './api'
function TodoList({ query }: { query: UseQueryResult<Todo[], Error> }) {
const data = React.use(query.promise)
return (
<ul>
{data.map(todo => (
<li key={todo.id}>{todo.title}</li>
))}
</ul>
)
}
export function App() {
const query = useQuery({ queryKey: ['todos'], queryFn: fetchTodos })
return (
<>
<h1>Todos</h1>
<React.Suspense fallback={<div>Loading...</div>}>
<TodoList query={query} />
</React.Suspense>
</>
)
}
The last successfully resolved data for the query.
The error object for the query, if an error was thrown.
null.A derived boolean from the status variable, provided for convenience.
true if the query attempt resulted in an error.Will be pending if there's no cached data and no query attempt was finished yet.
Is true whenever the first fetch for a query is in-flight.
isFetching && isPending.Will be true if the query failed while fetching for the first time.
Will be true if the query failed while refetching.
A derived boolean from the status variable, provided for convenience.
true if the query has received a response with no errors and is ready to display its data.Will be true if the data shown is the placeholder data.
The status of the query.
pending if there's no cached data and no query attempt was finished yet.error if the query attempt resulted in an error.success if the query has received a response with no errors and is ready to display its data.The timestamp for when the query most recently returned the status as "success".
The timestamp for when the query most recently returned the status as "error".
The failure count for the query.
0 when the query succeeds.The failure reason for the query retry.
null when the query succeeds.The sum of all errors.
Will be true if the query has been fetched.
Will be true if the query has been fetched after the component mounted.
A derived boolean from the fetchStatus variable, provided for convenience.
true whenever the queryFn is executing, which includes initial pending as well as background refetch.A derived boolean from the fetchStatus variable, provided for convenience.
paused.Is true whenever a background refetch is in-flight, which does not include initial pending.
isFetching && !isPending.Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.
A function to manually refetch the query.
The fetch status of the query.
fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch.paused: The query wanted to fetch, but has been paused.idle: The query is not fetching.A stable promise that will be resolved with the data of the query.
Requires the experimental_prefetchInRender feature flag to be enabled.
const client = new QueryClient({
defaultOptions: {
queries: {
experimental_prefetchInRender: true,
},
},
})
import { useQuery } from '@tanstack/react-query'
import React from 'react'
import { fetchTodos, type Todo } from './api'
function TodoList({ query }: { query: UseQueryResult<Todo[], Error> }) {
const data = React.use(query.promise)
return (
<ul>
{data.map(todo => (
<li key={todo.id}>{todo.title}</li>
))}
</ul>
)
}
export function App() {
const query = useQuery({ queryKey: ['todos'], queryFn: fetchTodos })
return (
<>
<h1>Todos</h1>
<React.Suspense fallback={<div>Loading...</div>}>
<TodoList query={query} />
</React.Suspense>
</>
)
}
The last successfully resolved data for the query.
The error object for the query, if an error was thrown.
null.A derived boolean from the status variable, provided for convenience.
true if the query attempt resulted in an error.Will be pending if there's no cached data and no query attempt was finished yet.
Is true whenever the first fetch for a query is in-flight.
isFetching && isPending.Will be true if the query failed while fetching for the first time.
Will be true if the query failed while refetching.
A derived boolean from the status variable, provided for convenience.
true if the query has received a response with no errors and is ready to display its data.Will be true if the data shown is the placeholder data.
The status of the query.
pending if there's no cached data and no query attempt was finished yet.error if the query attempt resulted in an error.success if the query has received a response with no errors and is ready to display its data.The timestamp for when the query most recently returned the status as "success".
The timestamp for when the query most recently returned the status as "error".
The failure count for the query.
0 when the query succeeds.The failure reason for the query retry.
null when the query succeeds.The sum of all errors.
Will be true if the query has been fetched.
Will be true if the query has been fetched after the component mounted.
A derived boolean from the fetchStatus variable, provided for convenience.
true whenever the queryFn is executing, which includes initial pending as well as background refetch.A derived boolean from the fetchStatus variable, provided for convenience.
paused.Is true whenever a background refetch is in-flight, which does not include initial pending.
isFetching && !isPending.Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.
A function to manually refetch the query.
The fetch status of the query.
fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch.paused: The query wanted to fetch, but has been paused.idle: The query is not fetching.A stable promise that will be resolved with the data of the query.
Requires the experimental_prefetchInRender feature flag to be enabled.
const client = new QueryClient({
defaultOptions: {
queries: {
experimental_prefetchInRender: true,
},
},
})
import { useQuery } from '@tanstack/react-query'
import React from 'react'
import { fetchTodos, type Todo } from './api'
function TodoList({ query }: { query: UseQueryResult<Todo[], Error> }) {
const data = React.use(query.promise)
return (
<ul>
{data.map(todo => (
<li key={todo.id}>{todo.title}</li>
))}
</ul>
)
}
export function App() {
const query = useQuery({ queryKey: ['todos'], queryFn: fetchTodos })
return (
<>
<h1>Todos</h1>
<React.Suspense fallback={<div>Loading...</div>}>
<TodoList query={query} />
</React.Suspense>
</>
)
}
The last successfully resolved data for the query.
The error object for the query, if an error was thrown.
null.A derived boolean from the status variable, provided for convenience.
true if the query attempt resulted in an error.Will be pending if there's no cached data and no query attempt was finished yet.
Will be true if the query failed while fetching for the first time.
Will be true if the query failed while refetching.
A derived boolean from the status variable, provided for convenience.
true if the query has received a response with no errors and is ready to display its data.Will be true if the data shown is the placeholder data.
The status of the query.
pending if there's no cached data and no query attempt was finished yet.error if the query attempt resulted in an error.success if the query has received a response with no errors and is ready to display its data.The timestamp for when the query most recently returned the status as "success".
The timestamp for when the query most recently returned the status as "error".
The failure count for the query.
0 when the query succeeds.The failure reason for the query retry.
null when the query succeeds.The sum of all errors.
Will be true if the query has been fetched.
Will be true if the query has been fetched after the component mounted.
A derived boolean from the fetchStatus variable, provided for convenience.
true whenever the queryFn is executing, which includes initial pending as well as background refetch.Is true whenever the first fetch for a query is in-flight.
isFetching && isPending.A derived boolean from the fetchStatus variable, provided for convenience.
paused.Is true whenever a background refetch is in-flight, which does not include initial pending.
isFetching && !isPending.Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.
A function to manually refetch the query.
The fetch status of the query.
fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch.paused: The query wanted to fetch, but has been paused.idle: The query is not fetching.A stable promise that will be resolved with the data of the query.
Requires the experimental_prefetchInRender feature flag to be enabled.
const client = new QueryClient({
defaultOptions: {
queries: {
experimental_prefetchInRender: true,
},
},
})
import { useQuery } from '@tanstack/react-query'
import React from 'react'
import { fetchTodos, type Todo } from './api'
function TodoList({ query }: { query: UseQueryResult<Todo[], Error> }) {
const data = React.use(query.promise)
return (
<ul>
{data.map(todo => (
<li key={todo.id}>{todo.title}</li>
))}
</ul>
)
}
export function App() {
const query = useQuery({ queryKey: ['todos'], queryFn: fetchTodos })
return (
<>
<h1>Todos</h1>
<React.Suspense fallback={<div>Loading...</div>}>
<TodoList query={query} />
</React.Suspense>
</>
)
}
The last successfully resolved data for the query.
A derived boolean from the status variable, provided for convenience.
true if the query attempt resulted in an error.The error object for the query, if an error was thrown.
null.Will be pending if there's no cached data and no query attempt was finished yet.
Is true whenever the first fetch for a query is in-flight.
isFetching && isPending.Will be true if the query failed while fetching for the first time.
Will be true if the query failed while refetching.
A derived boolean from the status variable, provided for convenience.
true if the query has received a response with no errors and is ready to display its data.Will be true if the data shown is the placeholder data.
The status of the query.
pending if there's no cached data and no query attempt was finished yet.error if the query attempt resulted in an error.success if the query has received a response with no errors and is ready to display its data.The timestamp for when the query most recently returned the status as "success".
The timestamp for when the query most recently returned the status as "error".
The failure count for the query.
0 when the query succeeds.The failure reason for the query retry.
null when the query succeeds.The sum of all errors.
Will be true if the query has been fetched.
Will be true if the query has been fetched after the component mounted.
A derived boolean from the fetchStatus variable, provided for convenience.
true whenever the queryFn is executing, which includes initial pending as well as background refetch.A derived boolean from the fetchStatus variable, provided for convenience.
paused.Is true whenever a background refetch is in-flight, which does not include initial pending.
isFetching && !isPending.Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.
A function to manually refetch the query.
The fetch status of the query.
fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch.paused: The query wanted to fetch, but has been paused.idle: The query is not fetching.A stable promise that will be resolved with the data of the query.
Requires the experimental_prefetchInRender feature flag to be enabled.
const client = new QueryClient({
defaultOptions: {
queries: {
experimental_prefetchInRender: true,
},
},
})
import { useQuery } from '@tanstack/react-query'
import React from 'react'
import { fetchTodos, type Todo } from './api'
function TodoList({ query }: { query: UseQueryResult<Todo[], Error> }) {
const data = React.use(query.promise)
return (
<ul>
{data.map(todo => (
<li key={todo.id}>{todo.title}</li>
))}
</ul>
)
}
export function App() {
const query = useQuery({ queryKey: ['todos'], queryFn: fetchTodos })
return (
<>
<h1>Todos</h1>
<React.Suspense fallback={<div>Loading...</div>}>
<TodoList query={query} />
</React.Suspense>
</>
)
}
A hook for fetching and tracking token balances related to active and featured RewardKit Boosts as configured in
RewardKitProvider. You may also pass additional filter configuration that will be merged with the RewardKit configuration on context. Filters and sorts token balances based on the incentive asset addresses involved in the Boosts.