@cooks/use-confirm
v1.0.1
Published
React Hook to update your document's confirm
Downloads
6
Readme
@cooks/use-confirm
React Hook to update your document's confirm
example) useConfirm.js
const App = () => {
const deleteWorld = () => console.log("Deleting the world...");
const abort = () => console.log("Aborted");
const confirmDelete = useConfirm("Are you sure", deleteWorld, abort);
return (
<button onClick={confirmDelete}>Delete the world</button>
);
};