-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(@yourssu/react): create useFunnel #67
base: main
Are you sure you want to change the base?
Conversation
return { | ||
Funnel: Object.assign(Funnel, { Step }), | ||
next, | ||
prev, | ||
setStep : setCurrentStep, | ||
}; |
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.
p4) 여기서 리턴 방식을 객체로 변경하신 이유가 있을까요?
이 훅같은 경우는 사용처에 따라 Funnel 컴포넌트의 이름이 바뀔 가능성이 큰데 배열로 리턴하면 그런 변경에 좀 더 유연하지 않을까 싶어요.
ex)
// 리턴 부분
return [Object.assign(Funnel, { Step }), { next, prev, setStep }] as const;
// 사용 부분
const [회원가입퍼널, { setStep }] = useFunnel(...)
느낌으로요.
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.
반영했습니다!
dbc872c
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.
수고하셨습니다!
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.
컨필릭 수정만 해주시면 될 것 같네요!
1️⃣ 어떤 작업을 했나요? (Summary)
기존 코드에 영향을 미치지 않는 변경사항
기존 코드에 영향을 미치는 변경사항
기존의 useFunnel과 다른 변경사항이 존재합니다
initialStep
(string): 퍼널의 초기 스텝을 설정합니다.totalSteps
(string[]): 퍼널의 전체 스텝을 설정합니다.Return value
example
버그 픽스
2️⃣ 알아두시면 좋아요!
3️⃣ 추후 작업
4️⃣ 체크리스트 (Checklist)
main
브랜치의 최신 코드를pull
받았나요?