import { FC } from 'react'; import { j as StateBase, A as AsyncState } from '../types-5EvFF6wb.cjs'; import 'keyweaver'; type Props = { state: S; /** Function that renders the state’s value. */ render(...args: S extends AsyncState ? [value: V | undefined, isLoaded: boolean, error: E | undefined] : S extends StateBase ? [value: V] : never): ReturnType; }; declare const Controller: { /** * A controller component that renders the value from the given {@link Props.state state}. * This component wraps the {@link useValue} hook and provides a flexible way * to render state values along with their loading and error statuses when applicable. * @example * ```jsx *
{value}
} * /> * * ( *
* {isLoaded ? ( * error ? Error: {error} : Value: {value} * ) : ( * Loading... * )} *
* )} * /> * ``` */ (props: Props): ReturnType; }; export = Controller;