import * as react_jsx_runtime from 'react/jsx-runtime'; import { PropsWithChildren, FC, SuspenseProps } from 'react'; import { A as AsyncState } from '../types-5EvFF6wb.js'; import 'keyweaver'; type Props = PropsWithChildren & { state: S; /** A function or element to render if the {@link Props.state state} fails. */ renderIfError?: ((error: S extends AsyncState ? E : never) => ReturnType) | ReturnType; } & Pick; /** * A controller component for rendering a {@link Props.state state} using `awaitOnly` to avoid unnecessary re-renders. * It utilizes the {@link use} hook to monitor the {@link Props.state state’s} resolution or failure. * This component integrates with the {@link Suspense} component, deferring rendering until the {@link Props.state state} is resolved or an error occurs. * * @example * ```jsx * Loading...} * renderIfError={(error) =>
Error: {error.message}
} * > *
Data loaded successfully!
*
* ``` */ declare const SuspenseOnlyController: (props: Props) => react_jsx_runtime.JSX.Element; export { SuspenseOnlyController as default };