@chooks/use-confirm

1.0.0 • Public • Published

Usage

요소에 이벤트가 발생했을 때 정말 그 함수를 실행할 것인지 확인한다.

export const App = () => {
    const deleteWorld = () => console.log("delete the world...");
    const confirmDelete = useConfirm("Are you sure?", deleteWorld);
    return <button onClick={confirmDelete}>Delete the world</button>;
  };

Readme

Keywords

Package Sidebar

Install

npm i @chooks/use-confirm

Weekly Downloads

3

Version

1.0.0

License

ISC

Unpacked Size

2.06 kB

Total Files

4

Last publish

Collaborators

  • chchaeun