• 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.

    Parameters

    • props: { address?: `0x${string}` } & Omit<RewardKitProfileParams, "claimantAddress">

      The props object

      • Optionaladdress?: `0x${string}`

        Optional address to fetch balances for

      • address

        Optional address to fetch balances for

      • creatorAddress

        Only show balances from offers created by this user's address

      • budgetAccount

        Only show balances from offers funded by this budget account

      • targetContract

        Only show balances from offers with actions that target this contract address. If specifying, you must also specify chainId

      • chainId

        Only show balances from offers with actions that target a contract on this chain ID. You must specify this if also specifying targetContract

    Returns
        | {
            balances: {
                address: `0x${string}`;
                amount: string;
                amountFormatted: string;
                amountUsd: number;
                chainId: number;
                decimals: number;
                imageUri: string;
                name: string;
                symbol: string;
                type: "ERC20";
                blocked: boolean;
            }[];
            data: Record;
            error: Error;
            isError: true;
            isPending: false;
            isLoading: false;
            isLoadingError: false;
            isRefetchError: true;
            isSuccess: false;
            isPlaceholderData: false;
            status: "error";
            dataUpdatedAt: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null
            | Error;
            errorUpdateCount: number;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isPaused: boolean;
            isRefetching: boolean;
            isStale: boolean;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<
                QueryObserverResult<
                    Record<
                        string,
                        {
                            balances: {
                                address: `0x${string}`;
                                amount: string;
                                amountFormatted: string;
                                amountUsd: number;
                                chainId: number;
                                decimals: number;
                                imageUri: string;
                                name: string;
                                symbol: string;
                                type: "ERC20";
                                blocked: boolean;
                            }[];
                            isFudged?: boolean;
                        },
                    >,
                    Error,
                >,
            >;
            fetchStatus: FetchStatus;
            promise: Promise<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
            >;
        }
        | {
            balances: {
                address: `0x${string}`;
                amount: string;
                amountFormatted: string;
                amountUsd: number;
                chainId: number;
                decimals: number;
                imageUri: string;
                name: string;
                symbol: string;
                type: "ERC20";
                blocked: boolean;
            }[];
            data: Record;
            error: null;
            isError: false;
            isPending: false;
            isLoading: false;
            isLoadingError: false;
            isRefetchError: false;
            isSuccess: true;
            isPlaceholderData: false;
            status: "success";
            dataUpdatedAt: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null
            | Error;
            errorUpdateCount: number;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isPaused: boolean;
            isRefetching: boolean;
            isStale: boolean;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<
                QueryObserverResult<
                    Record<
                        string,
                        {
                            balances: {
                                address: `0x${string}`;
                                amount: string;
                                amountFormatted: string;
                                amountUsd: number;
                                chainId: number;
                                decimals: number;
                                imageUri: string;
                                name: string;
                                symbol: string;
                                type: "ERC20";
                                blocked: boolean;
                            }[];
                            isFudged?: boolean;
                        },
                    >,
                    Error,
                >,
            >;
            fetchStatus: FetchStatus;
            promise: Promise<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
            >;
        }
        | {
            balances: {
                address: `0x${string}`;
                amount: string;
                amountFormatted: string;
                amountUsd: number;
                chainId: number;
                decimals: number;
                imageUri: string;
                name: string;
                symbol: string;
                type: "ERC20";
                blocked: boolean;
            }[];
            data: undefined;
            error: Error;
            isError: true;
            isPending: false;
            isLoading: false;
            isLoadingError: true;
            isRefetchError: false;
            isSuccess: false;
            isPlaceholderData: false;
            status: "error";
            dataUpdatedAt: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null
            | Error;
            errorUpdateCount: number;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isPaused: boolean;
            isRefetching: boolean;
            isStale: boolean;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<
                QueryObserverResult<
                    Record<
                        string,
                        {
                            balances: {
                                address: `0x${string}`;
                                amount: string;
                                amountFormatted: string;
                                amountUsd: number;
                                chainId: number;
                                decimals: number;
                                imageUri: string;
                                name: string;
                                symbol: string;
                                type: "ERC20";
                                blocked: boolean;
                            }[];
                            isFudged?: boolean;
                        },
                    >,
                    Error,
                >,
            >;
            fetchStatus: FetchStatus;
            promise: Promise<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
            >;
        }
        | {
            balances: {
                address: `0x${string}`;
                amount: string;
                amountFormatted: string;
                amountUsd: number;
                chainId: number;
                decimals: number;
                imageUri: string;
                name: string;
                symbol: string;
                type: "ERC20";
                blocked: boolean;
            }[];
            data: undefined;
            error: null;
            isError: false;
            isPending: true;
            isLoading: true;
            isLoadingError: false;
            isRefetchError: false;
            isSuccess: false;
            isPlaceholderData: false;
            status: "pending";
            dataUpdatedAt: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null
            | Error;
            errorUpdateCount: number;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isPaused: boolean;
            isRefetching: boolean;
            isStale: boolean;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<
                QueryObserverResult<
                    Record<
                        string,
                        {
                            balances: {
                                address: `0x${string}`;
                                amount: string;
                                amountFormatted: string;
                                amountUsd: number;
                                chainId: number;
                                decimals: number;
                                imageUri: string;
                                name: string;
                                symbol: string;
                                type: "ERC20";
                                blocked: boolean;
                            }[];
                            isFudged?: boolean;
                        },
                    >,
                    Error,
                >,
            >;
            fetchStatus: FetchStatus;
            promise: Promise<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
            >;
        }
        | {
            balances: {
                address: `0x${string}`;
                amount: string;
                amountFormatted: string;
                amountUsd: number;
                chainId: number;
                decimals: number;
                imageUri: string;
                name: string;
                symbol: string;
                type: "ERC20";
                blocked: boolean;
            }[];
            data: undefined;
            error: null;
            isError: false;
            isPending: true;
            isLoadingError: false;
            isRefetchError: false;
            isSuccess: false;
            isPlaceholderData: false;
            status: "pending";
            dataUpdatedAt: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null
            | Error;
            errorUpdateCount: number;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isLoading: boolean;
            isInitialLoading: boolean;
            isPaused: boolean;
            isRefetching: boolean;
            isStale: boolean;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<
                QueryObserverResult<
                    Record<
                        string,
                        {
                            balances: {
                                address: `0x${string}`;
                                amount: string;
                                amountFormatted: string;
                                amountUsd: number;
                                chainId: number;
                                decimals: number;
                                imageUri: string;
                                name: string;
                                symbol: string;
                                type: "ERC20";
                                blocked: boolean;
                            }[];
                            isFudged?: boolean;
                        },
                    >,
                    Error,
                >,
            >;
            fetchStatus: FetchStatus;
            promise: Promise<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
            >;
        }
        | {
            balances: {
                address: `0x${string}`;
                amount: string;
                amountFormatted: string;
                amountUsd: number;
                chainId: number;
                decimals: number;
                imageUri: string;
                name: string;
                symbol: string;
                type: "ERC20";
                blocked: boolean;
            }[];
            data: Record;
            isError: false;
            error: null;
            isPending: false;
            isLoading: false;
            isLoadingError: false;
            isRefetchError: false;
            isSuccess: true;
            isPlaceholderData: true;
            status: "success";
            dataUpdatedAt: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null
            | Error;
            errorUpdateCount: number;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isPaused: boolean;
            isRefetching: boolean;
            isStale: boolean;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<
                QueryObserverResult<
                    Record<
                        string,
                        {
                            balances: {
                                address: `0x${string}`;
                                amount: string;
                                amountFormatted: string;
                                amountUsd: number;
                                chainId: number;
                                decimals: number;
                                imageUri: string;
                                name: string;
                                symbol: string;
                                type: "ERC20";
                                blocked: boolean;
                            }[];
                            isFudged?: boolean;
                        },
                    >,
                    Error,
                >,
            >;
            fetchStatus: FetchStatus;
            promise: Promise<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
            >;
        }

    Query result enhanced with filtered balances

    • {
          balances: {
              address: `0x${string}`;
              amount: string;
              amountFormatted: string;
              amountUsd: number;
              chainId: number;
              decimals: number;
              imageUri: string;
              name: string;
              symbol: string;
              type: "ERC20";
              blocked: boolean;
          }[];
          data: Record;
          error: Error;
          isError: true;
          isPending: false;
          isLoading: false;
          isLoadingError: false;
          isRefetchError: true;
          isSuccess: false;
          isPlaceholderData: false;
          status: "error";
          dataUpdatedAt: number;
          errorUpdatedAt: number;
          failureCount: number;
          failureReason: null
          | Error;
          errorUpdateCount: number;
          isFetched: boolean;
          isFetchedAfterMount: boolean;
          isFetching: boolean;
          isInitialLoading: boolean;
          isPaused: boolean;
          isRefetching: boolean;
          isStale: boolean;
          refetch: (
              options?: RefetchOptions,
          ) => Promise<
              QueryObserverResult<
                  Record<
                      string,
                      {
                          balances: {
                              address: `0x${string}`;
                              amount: string;
                              amountFormatted: string;
                              amountUsd: number;
                              chainId: number;
                              decimals: number;
                              imageUri: string;
                              name: string;
                              symbol: string;
                              type: "ERC20";
                              blocked: boolean;
                          }[];
                          isFudged?: boolean;
                      },
                  >,
                  Error,
              >,
          >;
          fetchStatus: FetchStatus;
          promise: Promise<
              Record<
                  string,
                  {
                      balances: {
                          address: `0x${string}`;
                          amount: string;
                          amountFormatted: string;
                          amountUsd: number;
                          chainId: number;
                          decimals: number;
                          imageUri: string;
                          name: string;
                          symbol: string;
                          type: "ERC20";
                          blocked: boolean;
                      }[];
                      isFudged?: boolean;
                  },
              >,
          >;
      }
      • balances: {
            address: `0x${string}`;
            amount: string;
            amountFormatted: string;
            amountUsd: number;
            chainId: number;
            decimals: number;
            imageUri: string;
            name: string;
            symbol: string;
            type: "ERC20";
            blocked: boolean;
        }[]
      • data: Record

        The last successfully resolved data for the query.

      • error: Error

        The error object for the query, if an error was thrown.

        • Defaults to null.
      • isError: true

        A derived boolean from the status variable, provided for convenience.

        • true if the query attempt resulted in an error.
      • isPending: false

        Will be pending if there's no cached data and no query attempt was finished yet.

      • isLoading: false

        Is true whenever the first fetch for a query is in-flight.

        • Is the same as isFetching && isPending.
      • isLoadingError: false

        Will be true if the query failed while fetching for the first time.

      • isRefetchError: true

        Will be true if the query failed while refetching.

      • isSuccess: false

        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.
      • isPlaceholderData: false

        Will be true if the data shown is the placeholder data.

      • status: "error"

        The status of the query.

        • Will be:
          • 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.
      • dataUpdatedAt: number

        The timestamp for when the query most recently returned the status as "success".

      • errorUpdatedAt: number

        The timestamp for when the query most recently returned the status as "error".

      • failureCount: number

        The failure count for the query.

        • Incremented every time the query fails.
        • Reset to 0 when the query succeeds.
      • failureReason: null | Error

        The failure reason for the query retry.

        • Reset to null when the query succeeds.
      • errorUpdateCount: number

        The sum of all errors.

      • isFetched: boolean

        Will be true if the query has been fetched.

      • isFetchedAfterMount: boolean

        Will be true if the query has been fetched after the component mounted.

        • This property can be used to not show any previously cached data.
      • isFetching: boolean

        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.
      • isInitialLoading: boolean

        isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version.

      • isPaused: boolean

        A derived boolean from the fetchStatus variable, provided for convenience.

        • The query wanted to fetch, but has been paused.
      • isRefetching: boolean

        Is true whenever a background refetch is in-flight, which does not include initial pending.

        • Is the same as isFetching && !isPending.
      • isStale: boolean

        Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.

      • refetch: (
            options?: RefetchOptions,
        ) => Promise<
            QueryObserverResult<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
                Error,
            >,
        >

        A function to manually refetch the query.

      • fetchStatus: FetchStatus

        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.
        • See Network Mode for more information.
      • promise: Promise<
            Record<
                string,
                {
                    balances: {
                        address: `0x${string}`;
                        amount: string;
                        amountFormatted: string;
                        amountUsd: number;
                        chainId: number;
                        decimals: number;
                        imageUri: string;
                        name: string;
                        symbol: string;
                        type: "ERC20";
                        blocked: boolean;
                    }[];
                    isFudged?: boolean;
                },
            >,
        >

        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>
        </>
        )
        }
    • {
          balances: {
              address: `0x${string}`;
              amount: string;
              amountFormatted: string;
              amountUsd: number;
              chainId: number;
              decimals: number;
              imageUri: string;
              name: string;
              symbol: string;
              type: "ERC20";
              blocked: boolean;
          }[];
          data: Record;
          error: null;
          isError: false;
          isPending: false;
          isLoading: false;
          isLoadingError: false;
          isRefetchError: false;
          isSuccess: true;
          isPlaceholderData: false;
          status: "success";
          dataUpdatedAt: number;
          errorUpdatedAt: number;
          failureCount: number;
          failureReason: null
          | Error;
          errorUpdateCount: number;
          isFetched: boolean;
          isFetchedAfterMount: boolean;
          isFetching: boolean;
          isInitialLoading: boolean;
          isPaused: boolean;
          isRefetching: boolean;
          isStale: boolean;
          refetch: (
              options?: RefetchOptions,
          ) => Promise<
              QueryObserverResult<
                  Record<
                      string,
                      {
                          balances: {
                              address: `0x${string}`;
                              amount: string;
                              amountFormatted: string;
                              amountUsd: number;
                              chainId: number;
                              decimals: number;
                              imageUri: string;
                              name: string;
                              symbol: string;
                              type: "ERC20";
                              blocked: boolean;
                          }[];
                          isFudged?: boolean;
                      },
                  >,
                  Error,
              >,
          >;
          fetchStatus: FetchStatus;
          promise: Promise<
              Record<
                  string,
                  {
                      balances: {
                          address: `0x${string}`;
                          amount: string;
                          amountFormatted: string;
                          amountUsd: number;
                          chainId: number;
                          decimals: number;
                          imageUri: string;
                          name: string;
                          symbol: string;
                          type: "ERC20";
                          blocked: boolean;
                      }[];
                      isFudged?: boolean;
                  },
              >,
          >;
      }
      • balances: {
            address: `0x${string}`;
            amount: string;
            amountFormatted: string;
            amountUsd: number;
            chainId: number;
            decimals: number;
            imageUri: string;
            name: string;
            symbol: string;
            type: "ERC20";
            blocked: boolean;
        }[]
      • data: Record

        The last successfully resolved data for the query.

      • error: null

        The error object for the query, if an error was thrown.

        • Defaults to null.
      • isError: false

        A derived boolean from the status variable, provided for convenience.

        • true if the query attempt resulted in an error.
      • isPending: false

        Will be pending if there's no cached data and no query attempt was finished yet.

      • isLoading: false

        Is true whenever the first fetch for a query is in-flight.

        • Is the same as isFetching && isPending.
      • isLoadingError: false

        Will be true if the query failed while fetching for the first time.

      • isRefetchError: false

        Will be true if the query failed while refetching.

      • isSuccess: true

        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.
      • isPlaceholderData: false

        Will be true if the data shown is the placeholder data.

      • status: "success"

        The status of the query.

        • Will be:
          • 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.
      • dataUpdatedAt: number

        The timestamp for when the query most recently returned the status as "success".

      • errorUpdatedAt: number

        The timestamp for when the query most recently returned the status as "error".

      • failureCount: number

        The failure count for the query.

        • Incremented every time the query fails.
        • Reset to 0 when the query succeeds.
      • failureReason: null | Error

        The failure reason for the query retry.

        • Reset to null when the query succeeds.
      • errorUpdateCount: number

        The sum of all errors.

      • isFetched: boolean

        Will be true if the query has been fetched.

      • isFetchedAfterMount: boolean

        Will be true if the query has been fetched after the component mounted.

        • This property can be used to not show any previously cached data.
      • isFetching: boolean

        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.
      • isInitialLoading: boolean

        isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version.

      • isPaused: boolean

        A derived boolean from the fetchStatus variable, provided for convenience.

        • The query wanted to fetch, but has been paused.
      • isRefetching: boolean

        Is true whenever a background refetch is in-flight, which does not include initial pending.

        • Is the same as isFetching && !isPending.
      • isStale: boolean

        Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.

      • refetch: (
            options?: RefetchOptions,
        ) => Promise<
            QueryObserverResult<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
                Error,
            >,
        >

        A function to manually refetch the query.

      • fetchStatus: FetchStatus

        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.
        • See Network Mode for more information.
      • promise: Promise<
            Record<
                string,
                {
                    balances: {
                        address: `0x${string}`;
                        amount: string;
                        amountFormatted: string;
                        amountUsd: number;
                        chainId: number;
                        decimals: number;
                        imageUri: string;
                        name: string;
                        symbol: string;
                        type: "ERC20";
                        blocked: boolean;
                    }[];
                    isFudged?: boolean;
                },
            >,
        >

        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>
        </>
        )
        }
    • {
          balances: {
              address: `0x${string}`;
              amount: string;
              amountFormatted: string;
              amountUsd: number;
              chainId: number;
              decimals: number;
              imageUri: string;
              name: string;
              symbol: string;
              type: "ERC20";
              blocked: boolean;
          }[];
          data: undefined;
          error: Error;
          isError: true;
          isPending: false;
          isLoading: false;
          isLoadingError: true;
          isRefetchError: false;
          isSuccess: false;
          isPlaceholderData: false;
          status: "error";
          dataUpdatedAt: number;
          errorUpdatedAt: number;
          failureCount: number;
          failureReason: null
          | Error;
          errorUpdateCount: number;
          isFetched: boolean;
          isFetchedAfterMount: boolean;
          isFetching: boolean;
          isInitialLoading: boolean;
          isPaused: boolean;
          isRefetching: boolean;
          isStale: boolean;
          refetch: (
              options?: RefetchOptions,
          ) => Promise<
              QueryObserverResult<
                  Record<
                      string,
                      {
                          balances: {
                              address: `0x${string}`;
                              amount: string;
                              amountFormatted: string;
                              amountUsd: number;
                              chainId: number;
                              decimals: number;
                              imageUri: string;
                              name: string;
                              symbol: string;
                              type: "ERC20";
                              blocked: boolean;
                          }[];
                          isFudged?: boolean;
                      },
                  >,
                  Error,
              >,
          >;
          fetchStatus: FetchStatus;
          promise: Promise<
              Record<
                  string,
                  {
                      balances: {
                          address: `0x${string}`;
                          amount: string;
                          amountFormatted: string;
                          amountUsd: number;
                          chainId: number;
                          decimals: number;
                          imageUri: string;
                          name: string;
                          symbol: string;
                          type: "ERC20";
                          blocked: boolean;
                      }[];
                      isFudged?: boolean;
                  },
              >,
          >;
      }
      • balances: {
            address: `0x${string}`;
            amount: string;
            amountFormatted: string;
            amountUsd: number;
            chainId: number;
            decimals: number;
            imageUri: string;
            name: string;
            symbol: string;
            type: "ERC20";
            blocked: boolean;
        }[]
      • data: undefined

        The last successfully resolved data for the query.

      • error: Error

        The error object for the query, if an error was thrown.

        • Defaults to null.
      • isError: true

        A derived boolean from the status variable, provided for convenience.

        • true if the query attempt resulted in an error.
      • isPending: false

        Will be pending if there's no cached data and no query attempt was finished yet.

      • isLoading: false

        Is true whenever the first fetch for a query is in-flight.

        • Is the same as isFetching && isPending.
      • isLoadingError: true

        Will be true if the query failed while fetching for the first time.

      • isRefetchError: false

        Will be true if the query failed while refetching.

      • isSuccess: false

        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.
      • isPlaceholderData: false

        Will be true if the data shown is the placeholder data.

      • status: "error"

        The status of the query.

        • Will be:
          • 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.
      • dataUpdatedAt: number

        The timestamp for when the query most recently returned the status as "success".

      • errorUpdatedAt: number

        The timestamp for when the query most recently returned the status as "error".

      • failureCount: number

        The failure count for the query.

        • Incremented every time the query fails.
        • Reset to 0 when the query succeeds.
      • failureReason: null | Error

        The failure reason for the query retry.

        • Reset to null when the query succeeds.
      • errorUpdateCount: number

        The sum of all errors.

      • isFetched: boolean

        Will be true if the query has been fetched.

      • isFetchedAfterMount: boolean

        Will be true if the query has been fetched after the component mounted.

        • This property can be used to not show any previously cached data.
      • isFetching: boolean

        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.
      • isInitialLoading: boolean

        isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version.

      • isPaused: boolean

        A derived boolean from the fetchStatus variable, provided for convenience.

        • The query wanted to fetch, but has been paused.
      • isRefetching: boolean

        Is true whenever a background refetch is in-flight, which does not include initial pending.

        • Is the same as isFetching && !isPending.
      • isStale: boolean

        Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.

      • refetch: (
            options?: RefetchOptions,
        ) => Promise<
            QueryObserverResult<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
                Error,
            >,
        >

        A function to manually refetch the query.

      • fetchStatus: FetchStatus

        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.
        • See Network Mode for more information.
      • promise: Promise<
            Record<
                string,
                {
                    balances: {
                        address: `0x${string}`;
                        amount: string;
                        amountFormatted: string;
                        amountUsd: number;
                        chainId: number;
                        decimals: number;
                        imageUri: string;
                        name: string;
                        symbol: string;
                        type: "ERC20";
                        blocked: boolean;
                    }[];
                    isFudged?: boolean;
                },
            >,
        >

        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>
        </>
        )
        }
    • {
          balances: {
              address: `0x${string}`;
              amount: string;
              amountFormatted: string;
              amountUsd: number;
              chainId: number;
              decimals: number;
              imageUri: string;
              name: string;
              symbol: string;
              type: "ERC20";
              blocked: boolean;
          }[];
          data: undefined;
          error: null;
          isError: false;
          isPending: true;
          isLoading: true;
          isLoadingError: false;
          isRefetchError: false;
          isSuccess: false;
          isPlaceholderData: false;
          status: "pending";
          dataUpdatedAt: number;
          errorUpdatedAt: number;
          failureCount: number;
          failureReason: null
          | Error;
          errorUpdateCount: number;
          isFetched: boolean;
          isFetchedAfterMount: boolean;
          isFetching: boolean;
          isInitialLoading: boolean;
          isPaused: boolean;
          isRefetching: boolean;
          isStale: boolean;
          refetch: (
              options?: RefetchOptions,
          ) => Promise<
              QueryObserverResult<
                  Record<
                      string,
                      {
                          balances: {
                              address: `0x${string}`;
                              amount: string;
                              amountFormatted: string;
                              amountUsd: number;
                              chainId: number;
                              decimals: number;
                              imageUri: string;
                              name: string;
                              symbol: string;
                              type: "ERC20";
                              blocked: boolean;
                          }[];
                          isFudged?: boolean;
                      },
                  >,
                  Error,
              >,
          >;
          fetchStatus: FetchStatus;
          promise: Promise<
              Record<
                  string,
                  {
                      balances: {
                          address: `0x${string}`;
                          amount: string;
                          amountFormatted: string;
                          amountUsd: number;
                          chainId: number;
                          decimals: number;
                          imageUri: string;
                          name: string;
                          symbol: string;
                          type: "ERC20";
                          blocked: boolean;
                      }[];
                      isFudged?: boolean;
                  },
              >,
          >;
      }
      • balances: {
            address: `0x${string}`;
            amount: string;
            amountFormatted: string;
            amountUsd: number;
            chainId: number;
            decimals: number;
            imageUri: string;
            name: string;
            symbol: string;
            type: "ERC20";
            blocked: boolean;
        }[]
      • data: undefined

        The last successfully resolved data for the query.

      • error: null

        The error object for the query, if an error was thrown.

        • Defaults to null.
      • isError: false

        A derived boolean from the status variable, provided for convenience.

        • true if the query attempt resulted in an error.
      • isPending: true

        Will be pending if there's no cached data and no query attempt was finished yet.

      • isLoading: true

        Is true whenever the first fetch for a query is in-flight.

        • Is the same as isFetching && isPending.
      • isLoadingError: false

        Will be true if the query failed while fetching for the first time.

      • isRefetchError: false

        Will be true if the query failed while refetching.

      • isSuccess: false

        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.
      • isPlaceholderData: false

        Will be true if the data shown is the placeholder data.

      • status: "pending"

        The status of the query.

        • Will be:
          • 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.
      • dataUpdatedAt: number

        The timestamp for when the query most recently returned the status as "success".

      • errorUpdatedAt: number

        The timestamp for when the query most recently returned the status as "error".

      • failureCount: number

        The failure count for the query.

        • Incremented every time the query fails.
        • Reset to 0 when the query succeeds.
      • failureReason: null | Error

        The failure reason for the query retry.

        • Reset to null when the query succeeds.
      • errorUpdateCount: number

        The sum of all errors.

      • isFetched: boolean

        Will be true if the query has been fetched.

      • isFetchedAfterMount: boolean

        Will be true if the query has been fetched after the component mounted.

        • This property can be used to not show any previously cached data.
      • isFetching: boolean

        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.
      • isInitialLoading: boolean

        isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version.

      • isPaused: boolean

        A derived boolean from the fetchStatus variable, provided for convenience.

        • The query wanted to fetch, but has been paused.
      • isRefetching: boolean

        Is true whenever a background refetch is in-flight, which does not include initial pending.

        • Is the same as isFetching && !isPending.
      • isStale: boolean

        Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.

      • refetch: (
            options?: RefetchOptions,
        ) => Promise<
            QueryObserverResult<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
                Error,
            >,
        >

        A function to manually refetch the query.

      • fetchStatus: FetchStatus

        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.
        • See Network Mode for more information.
      • promise: Promise<
            Record<
                string,
                {
                    balances: {
                        address: `0x${string}`;
                        amount: string;
                        amountFormatted: string;
                        amountUsd: number;
                        chainId: number;
                        decimals: number;
                        imageUri: string;
                        name: string;
                        symbol: string;
                        type: "ERC20";
                        blocked: boolean;
                    }[];
                    isFudged?: boolean;
                },
            >,
        >

        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>
        </>
        )
        }
    • {
          balances: {
              address: `0x${string}`;
              amount: string;
              amountFormatted: string;
              amountUsd: number;
              chainId: number;
              decimals: number;
              imageUri: string;
              name: string;
              symbol: string;
              type: "ERC20";
              blocked: boolean;
          }[];
          data: undefined;
          error: null;
          isError: false;
          isPending: true;
          isLoadingError: false;
          isRefetchError: false;
          isSuccess: false;
          isPlaceholderData: false;
          status: "pending";
          dataUpdatedAt: number;
          errorUpdatedAt: number;
          failureCount: number;
          failureReason: null
          | Error;
          errorUpdateCount: number;
          isFetched: boolean;
          isFetchedAfterMount: boolean;
          isFetching: boolean;
          isLoading: boolean;
          isInitialLoading: boolean;
          isPaused: boolean;
          isRefetching: boolean;
          isStale: boolean;
          refetch: (
              options?: RefetchOptions,
          ) => Promise<
              QueryObserverResult<
                  Record<
                      string,
                      {
                          balances: {
                              address: `0x${string}`;
                              amount: string;
                              amountFormatted: string;
                              amountUsd: number;
                              chainId: number;
                              decimals: number;
                              imageUri: string;
                              name: string;
                              symbol: string;
                              type: "ERC20";
                              blocked: boolean;
                          }[];
                          isFudged?: boolean;
                      },
                  >,
                  Error,
              >,
          >;
          fetchStatus: FetchStatus;
          promise: Promise<
              Record<
                  string,
                  {
                      balances: {
                          address: `0x${string}`;
                          amount: string;
                          amountFormatted: string;
                          amountUsd: number;
                          chainId: number;
                          decimals: number;
                          imageUri: string;
                          name: string;
                          symbol: string;
                          type: "ERC20";
                          blocked: boolean;
                      }[];
                      isFudged?: boolean;
                  },
              >,
          >;
      }
      • balances: {
            address: `0x${string}`;
            amount: string;
            amountFormatted: string;
            amountUsd: number;
            chainId: number;
            decimals: number;
            imageUri: string;
            name: string;
            symbol: string;
            type: "ERC20";
            blocked: boolean;
        }[]
      • data: undefined

        The last successfully resolved data for the query.

      • error: null

        The error object for the query, if an error was thrown.

        • Defaults to null.
      • isError: false

        A derived boolean from the status variable, provided for convenience.

        • true if the query attempt resulted in an error.
      • isPending: true

        Will be pending if there's no cached data and no query attempt was finished yet.

      • isLoadingError: false

        Will be true if the query failed while fetching for the first time.

      • isRefetchError: false

        Will be true if the query failed while refetching.

      • isSuccess: false

        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.
      • isPlaceholderData: false

        Will be true if the data shown is the placeholder data.

      • status: "pending"

        The status of the query.

        • Will be:
          • 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.
      • dataUpdatedAt: number

        The timestamp for when the query most recently returned the status as "success".

      • errorUpdatedAt: number

        The timestamp for when the query most recently returned the status as "error".

      • failureCount: number

        The failure count for the query.

        • Incremented every time the query fails.
        • Reset to 0 when the query succeeds.
      • failureReason: null | Error

        The failure reason for the query retry.

        • Reset to null when the query succeeds.
      • errorUpdateCount: number

        The sum of all errors.

      • isFetched: boolean

        Will be true if the query has been fetched.

      • isFetchedAfterMount: boolean

        Will be true if the query has been fetched after the component mounted.

        • This property can be used to not show any previously cached data.
      • isFetching: boolean

        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.
      • isLoading: boolean

        Is true whenever the first fetch for a query is in-flight.

        • Is the same as isFetching && isPending.
      • isInitialLoading: boolean

        isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version.

      • isPaused: boolean

        A derived boolean from the fetchStatus variable, provided for convenience.

        • The query wanted to fetch, but has been paused.
      • isRefetching: boolean

        Is true whenever a background refetch is in-flight, which does not include initial pending.

        • Is the same as isFetching && !isPending.
      • isStale: boolean

        Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.

      • refetch: (
            options?: RefetchOptions,
        ) => Promise<
            QueryObserverResult<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
                Error,
            >,
        >

        A function to manually refetch the query.

      • fetchStatus: FetchStatus

        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.
        • See Network Mode for more information.
      • promise: Promise<
            Record<
                string,
                {
                    balances: {
                        address: `0x${string}`;
                        amount: string;
                        amountFormatted: string;
                        amountUsd: number;
                        chainId: number;
                        decimals: number;
                        imageUri: string;
                        name: string;
                        symbol: string;
                        type: "ERC20";
                        blocked: boolean;
                    }[];
                    isFudged?: boolean;
                },
            >,
        >

        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>
        </>
        )
        }
    • {
          balances: {
              address: `0x${string}`;
              amount: string;
              amountFormatted: string;
              amountUsd: number;
              chainId: number;
              decimals: number;
              imageUri: string;
              name: string;
              symbol: string;
              type: "ERC20";
              blocked: boolean;
          }[];
          data: Record;
          isError: false;
          error: null;
          isPending: false;
          isLoading: false;
          isLoadingError: false;
          isRefetchError: false;
          isSuccess: true;
          isPlaceholderData: true;
          status: "success";
          dataUpdatedAt: number;
          errorUpdatedAt: number;
          failureCount: number;
          failureReason: null
          | Error;
          errorUpdateCount: number;
          isFetched: boolean;
          isFetchedAfterMount: boolean;
          isFetching: boolean;
          isInitialLoading: boolean;
          isPaused: boolean;
          isRefetching: boolean;
          isStale: boolean;
          refetch: (
              options?: RefetchOptions,
          ) => Promise<
              QueryObserverResult<
                  Record<
                      string,
                      {
                          balances: {
                              address: `0x${string}`;
                              amount: string;
                              amountFormatted: string;
                              amountUsd: number;
                              chainId: number;
                              decimals: number;
                              imageUri: string;
                              name: string;
                              symbol: string;
                              type: "ERC20";
                              blocked: boolean;
                          }[];
                          isFudged?: boolean;
                      },
                  >,
                  Error,
              >,
          >;
          fetchStatus: FetchStatus;
          promise: Promise<
              Record<
                  string,
                  {
                      balances: {
                          address: `0x${string}`;
                          amount: string;
                          amountFormatted: string;
                          amountUsd: number;
                          chainId: number;
                          decimals: number;
                          imageUri: string;
                          name: string;
                          symbol: string;
                          type: "ERC20";
                          blocked: boolean;
                      }[];
                      isFudged?: boolean;
                  },
              >,
          >;
      }
      • balances: {
            address: `0x${string}`;
            amount: string;
            amountFormatted: string;
            amountUsd: number;
            chainId: number;
            decimals: number;
            imageUri: string;
            name: string;
            symbol: string;
            type: "ERC20";
            blocked: boolean;
        }[]
      • data: Record

        The last successfully resolved data for the query.

      • isError: false

        A derived boolean from the status variable, provided for convenience.

        • true if the query attempt resulted in an error.
      • error: null

        The error object for the query, if an error was thrown.

        • Defaults to null.
      • isPending: false

        Will be pending if there's no cached data and no query attempt was finished yet.

      • isLoading: false

        Is true whenever the first fetch for a query is in-flight.

        • Is the same as isFetching && isPending.
      • isLoadingError: false

        Will be true if the query failed while fetching for the first time.

      • isRefetchError: false

        Will be true if the query failed while refetching.

      • isSuccess: true

        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.
      • isPlaceholderData: true

        Will be true if the data shown is the placeholder data.

      • status: "success"

        The status of the query.

        • Will be:
          • 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.
      • dataUpdatedAt: number

        The timestamp for when the query most recently returned the status as "success".

      • errorUpdatedAt: number

        The timestamp for when the query most recently returned the status as "error".

      • failureCount: number

        The failure count for the query.

        • Incremented every time the query fails.
        • Reset to 0 when the query succeeds.
      • failureReason: null | Error

        The failure reason for the query retry.

        • Reset to null when the query succeeds.
      • errorUpdateCount: number

        The sum of all errors.

      • isFetched: boolean

        Will be true if the query has been fetched.

      • isFetchedAfterMount: boolean

        Will be true if the query has been fetched after the component mounted.

        • This property can be used to not show any previously cached data.
      • isFetching: boolean

        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.
      • isInitialLoading: boolean

        isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version.

      • isPaused: boolean

        A derived boolean from the fetchStatus variable, provided for convenience.

        • The query wanted to fetch, but has been paused.
      • isRefetching: boolean

        Is true whenever a background refetch is in-flight, which does not include initial pending.

        • Is the same as isFetching && !isPending.
      • isStale: boolean

        Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.

      • refetch: (
            options?: RefetchOptions,
        ) => Promise<
            QueryObserverResult<
                Record<
                    string,
                    {
                        balances: {
                            address: `0x${string}`;
                            amount: string;
                            amountFormatted: string;
                            amountUsd: number;
                            chainId: number;
                            decimals: number;
                            imageUri: string;
                            name: string;
                            symbol: string;
                            type: "ERC20";
                            blocked: boolean;
                        }[];
                        isFudged?: boolean;
                    },
                >,
                Error,
            >,
        >

        A function to manually refetch the query.

      • fetchStatus: FetchStatus

        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.
        • See Network Mode for more information.
      • promise: Promise<
            Record<
                string,
                {
                    balances: {
                        address: `0x${string}`;
                        amount: string;
                        amountFormatted: string;
                        amountUsd: number;
                        chainId: number;
                        decimals: number;
                        imageUri: string;
                        name: string;
                        symbol: string;
                        type: "ERC20";
                        blocked: boolean;
                    }[];
                    isFudged?: boolean;
                },
            >,
        >

        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>
        </>
        )
        }
    const { balances, isLoading } = useRewardKitBalances({
    address: "0x1234...",
    });

    if (isLoading) return <div>Loading...</div>;

    return (
    <ul>
    {balances.map(balance => (
    <li key={balance.address}>
    {balance.symbol}: {balance.amount} (${balance.amountUsd})
    </li>
    ))}
    </ul>
    );