-
Notifications
You must be signed in to change notification settings - Fork 8
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
Modal 컴포넌트 개선방안 논의 #1879
Comments
위클리 논의 중 나온 의문
|
|
const { status, open, close } = useModal()
return (
<>
<button onClick={() => open()}>모달 열기</button>
<Modal open={status === 'opened'} onClose={() => close()} />
</>
) 구현은 #1846 을 참고해주시면 됩니다. |
다이나믹한 경우는 사실 잘 떠오르진 않지만, Provider에 모든 모달이 미리 정의된 상태로 있어야 한다는 것은 부담도 크고 불필요한 경우가 많을 것 같아요. 위키 문서의 예시 코드엔 아래와 같이 4개뿐이지만 얼마든지 다양한 디자인으로 더 많은 모달이 필요할 수 있으니까요. <Alert />
<Modal />
<Confirm />
<TransitionModal /> 각 모달은 필요한 곳에서 만들어서 선언되어 있는 것이 좋을 것 같아요. 또한 2주 전 @inbeom 의 위클리 발표 주제로 나왔던 이슈와 비슷한 문제점도 있을듯해요. 특정 페이지에서만 필요한 모달을 따라서 저도 |
React@18에 추가된 |
위클리문서: https://titicaca.atlassian.net/wiki/spaces/dev/pages/2912911384
The text was updated successfully, but these errors were encountered: