import { type FunctionComponent } from 'react'; import { ExecuteQueryProps } from '../../../props'; /** * Executes a query and renders a function as child component. The child * component is passed the state of the query as defined in {@link QueryState}. * * This component takes the Children Prop Pattern and * offers an alternative approach to the {@link useExecuteQuery} hook. * * @example * Example of using the component to query the `Sample ECommerce` data source: * ```tsx * * { * ({data, isLoading, isError}) => { * if (isLoading) { * return
Loading...
; * } * if (isError) { * return
Error
; * } * if (data) { * console.log(data); * return
{`Total Rows: ${data.rows.length}`}
; * } * return null; * } * } *
* ``` * @param props - ExecuteQuery properties * @returns ExecuteQuery component * @group Queries */ export declare const ExecuteQuery: FunctionComponent;