refactor: Replace React Context with global object for baseURL management #17 #18
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)
기존 코드에 영향을 미치지 않는 변경사항
기존 코드에 영향을 미치는 변경사항
logging-system에 존재하는 Context 코드를 모두 삭제하였기 때문에 Product에 적용된 YLSWrapper를 삭제하여야 합니다.
window 객체에 등록시 기존의 Context 코드보다 번들링 사이즈를 줄일 수 있고 불필요한 코드를 제거하여 유지보수성이 높아지도록 리팩토링하였습니다.
Before
After
동작 확인
기존 Context 방식과 동일하게 동작합니다.
버그 픽스
2️⃣ 알아두시면 좋아요!
logging-system을 사용하는 프로덕트에서는 window 객체의 YLS_CONFIG에 baseUrl의 타입과 데이터를 등록해야 합니다.
3️⃣ 추후 작업
4️⃣ 체크리스트 (Checklist)
main
브랜치의 최신 코드를pull
받았나요?