Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧩 이슈 번호
✅ 작업 사항
#52 에서 작업했던 Funnel 컴포넌트의 각 Step에 타입을 일일히 제네릭으로 넣어줘야 했던 불편함이 있었어요.
이 부분을 개선해보고자 리팩토링 작업을 진행했어요.
createFunnel 헬퍼 함수
사용하는 측의 steps 배열 정보를 받고 퍼널, 스텝, 훅에 들어가야 할 제네릭을 넣어주게끔 헬퍼 함수를 작성했어요.
👩💻 공유 포인트 및 논의 사항
새로운 사용법
createFunnel
함수를 통해서Funnel
,Step
,useFunnel
훅을 가져올 수 있어요.그러면 이와 같이 Step 컴포넌트의 name에 들어갈 수 있는 문자열의 이름을 정확하게 추론해요.
전체 예시