Skip to content

Instantly share code, notes, and snippets.

@qkreltms
Created February 12, 2021 12:25
Show Gist options
  • Save qkreltms/e7cf3e7a9182a732b9905848d457c763 to your computer and use it in GitHub Desktop.
Save qkreltms/e7cf3e7a9182a732b9905848d457c763 to your computer and use it in GitHub Desktop.
import { confirm, destroyAll } from "./myModal";
export default function App() {
  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
      <button
        type="button"
        onClick={() => {
          confirm({ message: "1" });
          confirm({ message: "2" });
          destroyAll();
          confirm({ message: "3" }).destroy();
          confirm({ message: "4" });
          // 위 결과가 어떻게 될지 코드실행전 한번 예상해보세요.
        }}
      >
        confirm
      </button>
    </div>
  );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment