April 2020
Intermediate to advanced
716 pages
18h 55m
English
The DeleteUser component in client/user/DeleteUser.js is basically a button that we will add to the Profile view that, when clicked, opens a Dialog component asking the user to confirm the delete action, as shown in the following screenshot:

This component initializes the state with open set to false for the Dialog component, as well as redirect set to false so that it isn't rendered first.
mern-skeleton/client/user/DeleteUser.js:
export default function DeleteUser(props) { ... const [open, setOpen] = useState(false) const [redirect, setRedirect] = useState(false) ...}
The DeleteUser component will also receive props ...