Represents the props for the IIf component.

interface IIfProps<T extends any = object> {
    children: ReactNode;
    condition: boolean | (payload: T) => boolean | Promise<boolean>;
    deps?: any[];
    Else?: any;
    fallback?: (e: Error) => void;
    Loading?: any;
    onLoadEnd?: (isOk: boolean) => void;
    onLoadStart?: () => void;
    payload?: T;
    throwError?: boolean;
}

Type Parameters

  • T extends any = object

    The type of the payload.

Properties

children: ReactNode
condition: boolean | (payload: T) => boolean | Promise<boolean>
deps?: any[]
Else?: any
fallback?: (e: Error) => void
Loading?: any
onLoadEnd?: (isOk: boolean) => void
onLoadStart?: () => void
payload?: T
throwError?: boolean