In the examples shown, toasts are misused to display low-quality notifications, e.g. “x has been copied!”. Using toasts to display relevant error messages alleviates several problems:
- they work well in an otherwise cluttered user interface (error messages often break layouts)
- they allow the data layer to be substantially simplified, e.g. no need to store errors, error setters, error getters in Redux or similar
- they allow programmers to implement error handling toasts once and use everywhere