![]() |
VOOZH | about |
Popconfirm is a simple and compact confirmation dialog of an action. It is basically used to ask for user confirmation.
Ant Design Library has this component pre-built, and it is very easy to integrate as well. We can use this Popconfirm component using the following process easily.
Syntax:
<Popconfirm
title="Open Popconfirm?"
onConfirm={confirm}
onCancel={cancel}
okText="Yes"
cancelText="No"
>
<a href="#">Open Popconfirm</a>
</Popconfirm>Popconfirm Property:Creating React Application And Installing Module:
Step 1: Create a React application using the following command.
npx create-react-app demo
Step 2: After creating your project folder i.e. demo, move to it using the following command.
cd demo
Step 3: After creating the ReactJS application, Install the antd library using the following command.
npm install antd
Example: Now write the following code in filename app.js.
Running the application: Run the application by using the following command.
npm start
Output: Now open your browser and go to http://localhost:3000/, You will see the following output.
👁 ImageReference Link: https://ant.design/components/popconfirm/