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/#38 MSW 적용 #40
Feat/#38 MSW 적용 #40
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
지니어스의 지니님
아주 빠르게 MSW를 적용해주셨군요. 랜덤 api까지,,수고하셨습니다👍
현재 요청 값에 따른 에러응답은 전혀 하지 않은 상태인데 체크를 해주어야 할 지 고민이 되었습니다...😅 클라이언트의 요청 값에 따른 에러 처리까지 구현을 하는 것이 조금 애매하다고 느꼈습니다. 아니면 빈 값 체크 정도의 간단한 구현으로 처리하면 좋을까요?
음 MSW가 처음이라 어디까지 목업을 해야 할지 잘 모르겠네요..
일단 에러 응답 없이 가고, 레이아웃 + msw api 연결 후에도 실제 api 완성이 안 된 상태라면 그 때 제가 추가해서 사용하겠습니다!
src/pages/_app.tsx
Outdated
@@ -7,6 +7,10 @@ import { theme } from '~/types/theme'; | |||
import Header from '~/components/common/Header'; | |||
import MainContainer from '~/components/common/MainContainer'; | |||
|
|||
if (process.env.NODE_ENV === 'development') { |
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.
개발환경에서 실제 API로 연결할 때 MSW 비활성화 할 방법이 있나요??
import { rest } from 'msw'; | ||
|
||
export const handlers = [ | ||
rest.get('/random', (req, res, ctx) => { |
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.
😍👍👍👍
msw 에러 잡아내는데 도움이 되었습니다. 좋은 하루 되세요~ |
close #38
✅ 작업 내용
📌 이슈 사항
관련 글 mswjs/msw#1267 (comment)
✍ 궁금한 점