-
Notifications
You must be signed in to change notification settings - Fork 0
[URH-23] useConfirm 신규 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
멋진 훅이네요 고생하셨습니다! 😃
setMessage(message); | ||
return new Promise<boolean>((resolve) => { | ||
setResolve(() => resolve); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolve 함수를 상태로 받는 방식이 좋아 보이네요. 저도 자주 사용할 패턴이 될 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다! 평소 context까지 별도로 제공하는 형태를 지금까지 고려해보지 못해서 더 새로운 것 같습니다👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀수고하셨습니다!🚀
👾 Pull Request
1️⃣ Spec
confirm()
메서드와 동일한 기능을 제공하는 훅message
,isOpen
,confirm
,onConfirm
,onCancel
를 외부에 제공2️⃣ 변경 사항
3️⃣ 예시 코드
confirm()
메서드만 제공하려고 했던 계획이 변경되었습니다.