Represents a switch component that renders different elements based on the current location.

  • Parameters

    • SwitchProps: ISwitchProps

      The props for the Switch component.

      Represents the properties for the Switch component.

      • Optionalanimation?: "none" | "slideDown" | "fadeIn" | "scale"
      • Optionalchildren?: (result: ISwitchResult) => ReactNode
      • OptionalclassName?: string
      • OptionalError?: any
      • Optionalfallback?: (e: Error) => void
      • OptionalForbidden?: any
      • Optionalhistory?: any
      • items: ISwitchItem[]
      • OptionalLoader?: any
      • OptionalNotFound?: any
      • OptionalonDispose?: () => void
      • OptionalonInit?: () => void
      • OptionalonLoadEnd?: (isOk?: boolean) => void
      • OptionalonLoadStart?: () => void
      • Optionalstyle?: any
      • OptionalthrowError?: boolean

    Returns Element

    The Switch component.

Methods

  • Parameters

    • fn: (data: ISwitchResult) => void

    Returns () => void

  • Returns Promise<ISwitchResult>