March 2019
Intermediate to advanced
534 pages
14h 52m
English
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, { Fragment, useState } from 'react';import Button from '@material-ui/core/Button';import DialogTitle from '@material-ui/core/DialogTitle';import DialogContent from '@material-ui/core/DialogContent';import DialogContentText from '@material-ui/core/DialogContentText';import DialogActions from '@material-ui/core/DialogActions';import Dialog from '@material-ui/core/Dialog';export default function ConfirmingActions() { const [open, setOpen] = useState(false); const onShowConfirm ...Read now
Unlock full access