-
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
Dep 25 client repo setting #3
Conversation
- 절대경로 Import : preview.webpackFinal - next 설정 :@storybook/addon-styling - tailwind 설정: @storybook/nextjs
개발 모드를 판단하는 함수
- public instance - private instance - interceptor - api types
- @hookform/resolvers, yup: rhf공식문서에 추천하는 유효성 검증 라이브러리
- storybook decorators 설정
- tester useForm with validation - tester zustand store - tester query - tester api
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.
tailwind, nextjs, react-hook-form 등 안 써본 기술들이 많네요. 공부가 답이군요.
각 라이브러리 지원도 살피시고 config 구성하시느라 고생하셨습니다!👍👍👍
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:
{ | ||
"name": "next" | ||
} | ||
], | ||
"paths": { | ||
"@/*": ["./src/*"] |
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.
저도 이경로 좋아해요!ㅋㅋㅋ
⛳️ Task
FE 레포 레포 초기 세팅 작업을 진행했어요
1. 라이브러리 설치
2. husky, eslint, prettier
우선 제가 사용했던 규칙을 적용해 두었습니다. 리뷰로 의견 남겨주시면 좋을 것 같아요!
주요기능
3. 실행 방법
4. 폴더 구조 및 테스트용 코드
src/components/Tester
에 react-query, zustand, rhf, storybook 관련 예시가 있어요!✍️ Note
이슈1. MSW
혜현님이 말한대로 MSW에서 next13의 app router를 공식적으로 지원하지 않는다고 하네요. mswjs/msw#1610 (comment)
setupWorker()는 정상적으로 실행되서 가능하지만 setupServer()가 서버 단에서 실행되지 않아서 서버 fetch가 mocking되지 않는 듯합니다. setupWorker도 "첫 렌더링시 서비스 워커 등록이 되지 않아 네트워크 오류가 발생하는 문제가 문제"가 있습니다.
다른 mocking 대안을 찾아보거나 서버 개발 전에 Storybook(클라이언트 컴포넌트)개발 용으로 잠깐 써야 할 것 같아요!
참고: https://www.notion.so/depromeet/MSW-41c98fc39f074efb864f8764edc9c233?pvs=4
이슈2. react-query
react-query 도입과, server fetch 관련해서 지영님이 노션에 정리해주셨어요. 우선 기본적인 Provider 설정만 했는데 이후 얘기하고 다시 설정할 필요가 있어요!
참고: https://www.notion.so/depromeet/React-Query-812641b8322d4f7d901aad65d503c5d5?pvs=4
이슈3. storybook 7버전
6버전에서 7버전으로 바뀌면서 템플릿이 달라졌어요. 7버전에서 추천하는 방식은 여기를 참고해주세요.
참고: https://www.notion.so/depromeet/Stroybook7-ba2b3073bbe0494eb9e116bf631165b7?pvs=4
⚡️ Test
📸 Screenshot
📎 Reference