Migration
Breaking changes and upgrade tables when moving existing alert-notify apps to 3.0.
Migrating from 2.x to 3.0
| 2.x | 3.0 |
|---|---|
| First arg = title | First arg = message |
description | Use optional title for the heading; first arg is the body |
onDismiss / onAutoClose | onClose(toast, reason) with "Manual" | "Auto" |
html on standard toasts | toast.custom(...) only |
duration: Infinity for sticky | Prefer autoClose: false |
Default theme: "system" | Default theme: "light" |
Manual import "alert-notify/style.css" required | Auto-included from package entry (explicit import still OK) |
// 2.x
toast.success("Profile updated", { description: "Your profile was saved." });
// 3.0
toast.success("Your profile was saved.", { title: "Profile updated" });Migrating from 1.x
| 1.x | 3.x |
|---|---|
showAlert(SUCCESS, msg) | toast.success(msg) |
AlertNotifyContainer | Optional Toaster from /react, /vue, /svelte |
Style.scss / style.min.css | Auto CSS, or alert-notify/style.css |
timeout | duration (+ autoClose) |
isDismissible | closeButton / dismissible |
Also see the changelog.