May 2018
Intermediate to advanced
470 pages
13h 54m
English
The DeleteUser component in client/user/DeleteUser.js is basically a button that we will add to the Profile view, which when clicked opens a Dialog component asking the user to confirm the delete action:

The component first initializes the state with open set to false for the Dialog component, and redirect also set to false so it isn't rendered first.
mern-skeleton/client/user/DeleteUser.js:
class DeleteUser extends Component { state = { redirect: false, open: false } ...
Next, we need handler methods to open and close the dialog button. The dialog is opened when the user clicks the delete button.
mern-skeleton/client ...
Read now
Unlock full access