Closed vikramnayyarcs closed 2 years ago
Hi! The toast function takes only two arguments: the message & the options object. In you example only the first object is respected. You can combine them into one:
toast.error("Dashboard name cannot be empty.", {
id: "DashboardNameNotEmpty",
style: { backgroundColor: "#FFFFFF33", color: "white" },
});
Take the following 2 lines:
The 1st line will only re-render the toast when the toast changes. The 2nd line will re-render multiple times (not appropriate for my useCase) but on the other hand, it retains the styles.
Ideally both the ID functionality and the styles should be retained (not break based on their order).