Export of toast from react-hot-toast/headless, which is an API for creating notifications,

⚠️ but without the remove method ⚠️.

See the documentation for more details.

  • Parameters

    • Rest...args: [message: Message, opts?: Partial<Pick<Toast,
          | "id"
          | "position"
          | "className"
          | "style"
          | "icon"
          | "duration"
          | "ariaProps"
          | "iconTheme">>]

    Returns string

Properties

custom: ToastHandler
error: ToastHandler
loading: ToastHandler
success: ToastHandler

Methods

  • Parameters

    • OptionaltoastId: string

    Returns void

  • Type Parameters

    • T

    Parameters

    • promise: Promise<T>
    • msgs: {
          error: ValueOrFunction<Renderable, any>;
          loading: Renderable;
          success: ValueOrFunction<Renderable, T>;
      }
      • error: ValueOrFunction<Renderable, any>
      • loading: Renderable
      • success: ValueOrFunction<Renderable, T>
    • Optionalopts: DefaultToastOptions

    Returns Promise<T>