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.
1️⃣ 어떤 작업을 했나요? (Summary)
2025-02-13.3.06.03.mov
prefixUrl
,retry
,hooks
옵션을 활용하여 base URL 설정, 재시도 로직, 인터셉터 구현2️⃣ 알아두시면 좋아요!
.env
는 노션에 있습니다.useRef()
를 사용했습니다.const processedRef = useRef(false);
이거에여~ 대안으로useOnceEffect
와 같은 커스텀 훅을 만들어서 사용하는 방법도 있는데 뭐가 더 좋으신가여??DEFAULT_API_RETRY_LIMIT = 2
로 설정되어 있습니당 두 번 시도 후 실패 시 로그아웃 됩니다.beforeRequest
사용해서 헤더에 인증 토큰 같이 보내주고beforeRetry
로 401 에러라면 토큰 재발급 하는 로직입니당3️⃣ 추후 작업
4️⃣ 체크리스트 (Checklist)
main
브랜치의 최신 코드를pull
받았나요?