Confirmation dialogs act as a safety net for your users. They're useful when the user is about to perform something that could potentially be dangerous, but not for every conceivable action in the app. An action can be considered dangerous if, once performed, it cannot be reverted. An example of a dangerous action would be deleting an account or processing a payment. In these cases, you should always use a confirmation dialog.
Confirming actions
How to do it...
Confirmation dialogs should be straightforward so that the user can easily read what is about to happen and can decide whether to cancel the action or to continue. Here's some code that shows a confirmation dialog before executing an action:
import React,...