April 2020
Intermediate to advanced
716 pages
18h 55m
English
The DeleteShop component is added to the MyShops component for each shop in the list. It takes the shop object and a onRemove method as props from MyShops. This component is basically a button that, when clicked, opens a Dialog component asking the user to confirm the delete action, as shown in the following screenshot:

The implementation of the DeleteShop component is similar to the DeleteUser component discussed in Chapter 4, Adding a React Frontend to Complete MERN. Instead of a user ID, the DeleteShop component will take the shop object and onRemove function definition from the MyShops component as props when ...
Read now
Unlock full access