A modal is a dialog box/popup that is displayed over the current window, is suitable for almost all projects. In this recipe, we will learn how to implement a basic modal using the react-popup package.
Displaying information in a modal with react-popup
Getting ready
For this recipe, you need to install react-popup. Let's do it with this command:
npm install react-popup
How to do it...
Using the last recipe's code, we are going to add a basic popup to display information about the person that we registered in the form:
- Open your App.jsx file and import the Popup...