@xw3/maki-ts-cms
    Preparing search index...

    Function useUsers

    • Parameters

      • Optionalparams: any

      Returns
          | {
              data: any;
              dataUpdatedAt: number;
              error: Error;
              errorUpdateCount: number;
              errorUpdatedAt: number;
              failureCount: number;
              failureReason: null
              | Error;
              fetchStatus: FetchStatus;
              filters: {
                  filters: any;
                  limit: (first?: any) => void;
                  next: () => void;
                  page: number;
                  prev: () => void;
                  remove: (field: string) => void;
                  reset: () => void;
                  set: (newFilters?: any) => void;
                  setFilters: Dispatch<any>;
                  sortBy: (sort?: any) => void;
              };
              isError: true;
              isFetched: boolean;
              isFetchedAfterMount: boolean;
              isFetching: boolean;
              isInitialLoading: boolean;
              isLoading: false;
              isLoadingError: false;
              isPaused: boolean;
              isPending: false;
              isPlaceholderData: false;
              isRefetchError: true;
              isRefetching: boolean;
              isStale: boolean;
              isSuccess: false;
              promise: Promise<any>;
              refetch: (
                  options?: RefetchOptions,
              ) => Promise<QueryObserverResult<any, Error>>;
              status: "error";
          }
          | {
              data: any;
              dataUpdatedAt: number;
              error: null;
              errorUpdateCount: number;
              errorUpdatedAt: number;
              failureCount: number;
              failureReason: null
              | Error;
              fetchStatus: FetchStatus;
              filters: {
                  filters: any;
                  limit: (first?: any) => void;
                  next: () => void;
                  page: number;
                  prev: () => void;
                  remove: (field: string) => void;
                  reset: () => void;
                  set: (newFilters?: any) => void;
                  setFilters: Dispatch<any>;
                  sortBy: (sort?: any) => void;
              };
              isError: false;
              isFetched: boolean;
              isFetchedAfterMount: boolean;
              isFetching: boolean;
              isInitialLoading: boolean;
              isLoading: false;
              isLoadingError: false;
              isPaused: boolean;
              isPending: false;
              isPlaceholderData: false;
              isRefetchError: false;
              isRefetching: boolean;
              isStale: boolean;
              isSuccess: true;
              promise: Promise<any>;
              refetch: (
                  options?: RefetchOptions,
              ) => Promise<QueryObserverResult<any, Error>>;
              status: "success";
          }
          | {
              data: undefined;
              dataUpdatedAt: number;
              error: Error;
              errorUpdateCount: number;
              errorUpdatedAt: number;
              failureCount: number;
              failureReason: null
              | Error;
              fetchStatus: FetchStatus;
              filters: {
                  filters: any;
                  limit: (first?: any) => void;
                  next: () => void;
                  page: number;
                  prev: () => void;
                  remove: (field: string) => void;
                  reset: () => void;
                  set: (newFilters?: any) => void;
                  setFilters: Dispatch<any>;
                  sortBy: (sort?: any) => void;
              };
              isError: true;
              isFetched: boolean;
              isFetchedAfterMount: boolean;
              isFetching: boolean;
              isInitialLoading: boolean;
              isLoading: false;
              isLoadingError: true;
              isPaused: boolean;
              isPending: false;
              isPlaceholderData: false;
              isRefetchError: false;
              isRefetching: boolean;
              isStale: boolean;
              isSuccess: false;
              promise: Promise<any>;
              refetch: (
                  options?: RefetchOptions,
              ) => Promise<QueryObserverResult<any, Error>>;
              status: "error";
          }
          | {
              data: undefined;
              dataUpdatedAt: number;
              error: null;
              errorUpdateCount: number;
              errorUpdatedAt: number;
              failureCount: number;
              failureReason: null
              | Error;
              fetchStatus: FetchStatus;
              filters: {
                  filters: any;
                  limit: (first?: any) => void;
                  next: () => void;
                  page: number;
                  prev: () => void;
                  remove: (field: string) => void;
                  reset: () => void;
                  set: (newFilters?: any) => void;
                  setFilters: Dispatch<any>;
                  sortBy: (sort?: any) => void;
              };
              isError: false;
              isFetched: boolean;
              isFetchedAfterMount: boolean;
              isFetching: boolean;
              isInitialLoading: boolean;
              isLoading: true;
              isLoadingError: false;
              isPaused: boolean;
              isPending: true;
              isPlaceholderData: false;
              isRefetchError: false;
              isRefetching: boolean;
              isStale: boolean;
              isSuccess: false;
              promise: Promise<any>;
              refetch: (
                  options?: RefetchOptions,
              ) => Promise<QueryObserverResult<any, Error>>;
              status: "pending";
          }
          | {
              data: undefined;
              dataUpdatedAt: number;
              error: null;
              errorUpdateCount: number;
              errorUpdatedAt: number;
              failureCount: number;
              failureReason: null
              | Error;
              fetchStatus: FetchStatus;
              filters: {
                  filters: any;
                  limit: (first?: any) => void;
                  next: () => void;
                  page: number;
                  prev: () => void;
                  remove: (field: string) => void;
                  reset: () => void;
                  set: (newFilters?: any) => void;
                  setFilters: Dispatch<any>;
                  sortBy: (sort?: any) => void;
              };
              isError: false;
              isFetched: boolean;
              isFetchedAfterMount: boolean;
              isFetching: boolean;
              isInitialLoading: boolean;
              isLoading: boolean;
              isLoadingError: false;
              isPaused: boolean;
              isPending: true;
              isPlaceholderData: false;
              isRefetchError: false;
              isRefetching: boolean;
              isStale: boolean;
              isSuccess: false;
              promise: Promise<any>;
              refetch: (
                  options?: RefetchOptions,
              ) => Promise<QueryObserverResult<any, Error>>;
              status: "pending";
          }
          | {
              data: any;
              dataUpdatedAt: number;
              error: null;
              errorUpdateCount: number;
              errorUpdatedAt: number;
              failureCount: number;
              failureReason: null
              | Error;
              fetchStatus: FetchStatus;
              filters: {
                  filters: any;
                  limit: (first?: any) => void;
                  next: () => void;
                  page: number;
                  prev: () => void;
                  remove: (field: string) => void;
                  reset: () => void;
                  set: (newFilters?: any) => void;
                  setFilters: Dispatch<any>;
                  sortBy: (sort?: any) => void;
              };
              isError: false;
              isFetched: boolean;
              isFetchedAfterMount: boolean;
              isFetching: boolean;
              isInitialLoading: boolean;
              isLoading: false;
              isLoadingError: false;
              isPaused: boolean;
              isPending: false;
              isPlaceholderData: true;
              isRefetchError: false;
              isRefetching: boolean;
              isStale: boolean;
              isSuccess: true;
              promise: Promise<any>;
              refetch: (
                  options?: RefetchOptions,
              ) => Promise<QueryObserverResult<any, Error>>;
              status: "success";
          }

      • {
            data: any;
            dataUpdatedAt: number;
            error: Error;
            errorUpdateCount: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null | Error;
            fetchStatus: FetchStatus;
            filters: {
                filters: any;
                limit: (first?: any) => void;
                next: () => void;
                page: number;
                prev: () => void;
                remove: (field: string) => void;
                reset: () => void;
                set: (newFilters?: any) => void;
                setFilters: Dispatch<any>;
                sortBy: (sort?: any) => void;
            };
            isError: true;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isLoading: false;
            isLoadingError: false;
            isPaused: boolean;
            isPending: false;
            isPlaceholderData: false;
            isRefetchError: true;
            isRefetching: boolean;
            isStale: boolean;
            isSuccess: false;
            promise: Promise<any>;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<QueryObserverResult<any, Error>>;
            status: "error";
        }
        • data: any

          The last successfully resolved data for the query.

        • dataUpdatedAt: number

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

        • error: Error

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

          • Defaults to null.
        • errorUpdateCount: number

          The sum of all errors.

        • 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.
        • 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.
        • filters: {
              filters: any;
              limit: (first?: any) => void;
              next: () => void;
              page: number;
              prev: () => void;
              remove: (field: string) => void;
              reset: () => void;
              set: (newFilters?: any) => void;
              setFilters: Dispatch<any>;
              sortBy: (sort?: any) => void;
          }
        • isError: true

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

          • true if the query attempt resulted in an error.
        • 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.

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

        • isPaused: boolean

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

          • The query wanted to fetch, but has been paused.
        • isPending: false

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

        • isPlaceholderData: false

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

        • isRefetchError: true

          Will be true if the query failed while refetching.

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

        • 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.
        • promise: Promise<any>

          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>
          </>
          )
          }
        • refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>

          A function to manually refetch the query.

        • 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.
      • {
            data: any;
            dataUpdatedAt: number;
            error: null;
            errorUpdateCount: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null | Error;
            fetchStatus: FetchStatus;
            filters: {
                filters: any;
                limit: (first?: any) => void;
                next: () => void;
                page: number;
                prev: () => void;
                remove: (field: string) => void;
                reset: () => void;
                set: (newFilters?: any) => void;
                setFilters: Dispatch<any>;
                sortBy: (sort?: any) => void;
            };
            isError: false;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isLoading: false;
            isLoadingError: false;
            isPaused: boolean;
            isPending: false;
            isPlaceholderData: false;
            isRefetchError: false;
            isRefetching: boolean;
            isStale: boolean;
            isSuccess: true;
            promise: Promise<any>;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<QueryObserverResult<any, Error>>;
            status: "success";
        }
        • data: any

          The last successfully resolved data for the query.

        • dataUpdatedAt: number

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

        • error: null

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

          • Defaults to null.
        • errorUpdateCount: number

          The sum of all errors.

        • 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.
        • 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.
        • filters: {
              filters: any;
              limit: (first?: any) => void;
              next: () => void;
              page: number;
              prev: () => void;
              remove: (field: string) => void;
              reset: () => void;
              set: (newFilters?: any) => void;
              setFilters: Dispatch<any>;
              sortBy: (sort?: any) => void;
          }
        • isError: false

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

          • true if the query attempt resulted in an error.
        • 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.

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

        • isPaused: boolean

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

          • The query wanted to fetch, but has been paused.
        • isPending: false

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

        • isPlaceholderData: false

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

        • isRefetchError: false

          Will be true if the query failed while refetching.

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

        • 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.
        • promise: Promise<any>

          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>
          </>
          )
          }
        • refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>

          A function to manually refetch the query.

        • 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.
      • {
            data: undefined;
            dataUpdatedAt: number;
            error: Error;
            errorUpdateCount: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null | Error;
            fetchStatus: FetchStatus;
            filters: {
                filters: any;
                limit: (first?: any) => void;
                next: () => void;
                page: number;
                prev: () => void;
                remove: (field: string) => void;
                reset: () => void;
                set: (newFilters?: any) => void;
                setFilters: Dispatch<any>;
                sortBy: (sort?: any) => void;
            };
            isError: true;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isLoading: false;
            isLoadingError: true;
            isPaused: boolean;
            isPending: false;
            isPlaceholderData: false;
            isRefetchError: false;
            isRefetching: boolean;
            isStale: boolean;
            isSuccess: false;
            promise: Promise<any>;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<QueryObserverResult<any, Error>>;
            status: "error";
        }
        • data: undefined

          The last successfully resolved data for the query.

        • dataUpdatedAt: number

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

        • error: Error

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

          • Defaults to null.
        • errorUpdateCount: number

          The sum of all errors.

        • 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.
        • 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.
        • filters: {
              filters: any;
              limit: (first?: any) => void;
              next: () => void;
              page: number;
              prev: () => void;
              remove: (field: string) => void;
              reset: () => void;
              set: (newFilters?: any) => void;
              setFilters: Dispatch<any>;
              sortBy: (sort?: any) => void;
          }
        • isError: true

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

          • true if the query attempt resulted in an error.
        • 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.

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

        • isPaused: boolean

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

          • The query wanted to fetch, but has been paused.
        • isPending: false

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

        • isPlaceholderData: false

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

        • isRefetchError: false

          Will be true if the query failed while refetching.

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

        • 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.
        • promise: Promise<any>

          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>
          </>
          )
          }
        • refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>

          A function to manually refetch the query.

        • 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.
      • {
            data: undefined;
            dataUpdatedAt: number;
            error: null;
            errorUpdateCount: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null | Error;
            fetchStatus: FetchStatus;
            filters: {
                filters: any;
                limit: (first?: any) => void;
                next: () => void;
                page: number;
                prev: () => void;
                remove: (field: string) => void;
                reset: () => void;
                set: (newFilters?: any) => void;
                setFilters: Dispatch<any>;
                sortBy: (sort?: any) => void;
            };
            isError: false;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isLoading: true;
            isLoadingError: false;
            isPaused: boolean;
            isPending: true;
            isPlaceholderData: false;
            isRefetchError: false;
            isRefetching: boolean;
            isStale: boolean;
            isSuccess: false;
            promise: Promise<any>;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<QueryObserverResult<any, Error>>;
            status: "pending";
        }
        • data: undefined

          The last successfully resolved data for the query.

        • dataUpdatedAt: number

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

        • error: null

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

          • Defaults to null.
        • errorUpdateCount: number

          The sum of all errors.

        • 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.
        • 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.
        • filters: {
              filters: any;
              limit: (first?: any) => void;
              next: () => void;
              page: number;
              prev: () => void;
              remove: (field: string) => void;
              reset: () => void;
              set: (newFilters?: any) => void;
              setFilters: Dispatch<any>;
              sortBy: (sort?: any) => void;
          }
        • isError: false

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

          • true if the query attempt resulted in an error.
        • 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.

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

        • isPaused: boolean

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

          • The query wanted to fetch, but has been paused.
        • isPending: true

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

        • isPlaceholderData: false

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

        • isRefetchError: false

          Will be true if the query failed while refetching.

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

        • 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.
        • promise: Promise<any>

          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>
          </>
          )
          }
        • refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>

          A function to manually refetch the query.

        • 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.
      • {
            data: undefined;
            dataUpdatedAt: number;
            error: null;
            errorUpdateCount: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null | Error;
            fetchStatus: FetchStatus;
            filters: {
                filters: any;
                limit: (first?: any) => void;
                next: () => void;
                page: number;
                prev: () => void;
                remove: (field: string) => void;
                reset: () => void;
                set: (newFilters?: any) => void;
                setFilters: Dispatch<any>;
                sortBy: (sort?: any) => void;
            };
            isError: false;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isLoading: boolean;
            isLoadingError: false;
            isPaused: boolean;
            isPending: true;
            isPlaceholderData: false;
            isRefetchError: false;
            isRefetching: boolean;
            isStale: boolean;
            isSuccess: false;
            promise: Promise<any>;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<QueryObserverResult<any, Error>>;
            status: "pending";
        }
        • data: undefined

          The last successfully resolved data for the query.

        • dataUpdatedAt: number

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

        • error: null

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

          • Defaults to null.
        • errorUpdateCount: number

          The sum of all errors.

        • 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.
        • 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.
        • filters: {
              filters: any;
              limit: (first?: any) => void;
              next: () => void;
              page: number;
              prev: () => void;
              remove: (field: string) => void;
              reset: () => void;
              set: (newFilters?: any) => void;
              setFilters: Dispatch<any>;
              sortBy: (sort?: any) => void;
          }
        • isError: false

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

          • true if the query attempt resulted in an error.
        • 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.

        • isLoading: boolean

          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.

        • isPaused: boolean

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

          • The query wanted to fetch, but has been paused.
        • isPending: true

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

        • isPlaceholderData: false

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

        • isRefetchError: false

          Will be true if the query failed while refetching.

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

        • 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.
        • promise: Promise<any>

          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>
          </>
          )
          }
        • refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>

          A function to manually refetch the query.

        • 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.
      • {
            data: any;
            dataUpdatedAt: number;
            error: null;
            errorUpdateCount: number;
            errorUpdatedAt: number;
            failureCount: number;
            failureReason: null | Error;
            fetchStatus: FetchStatus;
            filters: {
                filters: any;
                limit: (first?: any) => void;
                next: () => void;
                page: number;
                prev: () => void;
                remove: (field: string) => void;
                reset: () => void;
                set: (newFilters?: any) => void;
                setFilters: Dispatch<any>;
                sortBy: (sort?: any) => void;
            };
            isError: false;
            isFetched: boolean;
            isFetchedAfterMount: boolean;
            isFetching: boolean;
            isInitialLoading: boolean;
            isLoading: false;
            isLoadingError: false;
            isPaused: boolean;
            isPending: false;
            isPlaceholderData: true;
            isRefetchError: false;
            isRefetching: boolean;
            isStale: boolean;
            isSuccess: true;
            promise: Promise<any>;
            refetch: (
                options?: RefetchOptions,
            ) => Promise<QueryObserverResult<any, Error>>;
            status: "success";
        }
        • data: any

          The last successfully resolved data for the query.

        • dataUpdatedAt: number

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

        • error: null

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

          • Defaults to null.
        • errorUpdateCount: number

          The sum of all errors.

        • 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.
        • 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.
        • filters: {
              filters: any;
              limit: (first?: any) => void;
              next: () => void;
              page: number;
              prev: () => void;
              remove: (field: string) => void;
              reset: () => void;
              set: (newFilters?: any) => void;
              setFilters: Dispatch<any>;
              sortBy: (sort?: any) => void;
          }
        • isError: false

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

          • true if the query attempt resulted in an error.
        • 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.

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

        • isPaused: boolean

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

          • The query wanted to fetch, but has been paused.
        • isPending: false

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

        • isPlaceholderData: true

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

        • isRefetchError: false

          Will be true if the query failed while refetching.

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

        • 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.
        • promise: Promise<any>

          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>
          </>
          )
          }
        • refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>

          A function to manually refetch the query.

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