Alert dialogs are similar to confirmation dialogs. You can think of alerts as really important snackbars that cannot be ignored. Like confirmations, alerts cause interruption and have to be explicitly acknowledged to get rid of them. Furthermore, alert dialogs might not be displayed as the direct result of an action taken by the user. Alerts can be displayed as the result of changes to the environment the user is interacting with.
Displaying alerts
How to do it...
Let's say that your application needs to be able to alert users when their allotted disk space is running low. Here's an example that shows what the alert might look like:
import React, { Fragment, useState } from 'react';
import Button from &apos...