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.
신경써서 구현한 부분
context생성provider감싸기value에language상태와 언어 전환 함수KO,EN을 함께 전달하여 하위 컴포넌트에서 언어 상태를 조회하여 조건부 렌더링하거나KO/EN를 호출할 수 있도록 하였습니다.useContext사용useContext를 사용해 전역 언어 상태를 가져와서 선택한 언어에 따라 보이는 홈 화면의 텍스트를 조건부 렌더링하였습니다.새롭게 알게 된 내용
저는 조건부 렌더링으로 삼항연산자를 사용하였지만 위의 코드처럼 언어별로 보여줄 텍스트들을 객체로 선언하면 유지보수도 간편해지고, 영어가 아닌 다른 언어를 추가할 때도 TEXT 객체에만 내용을 추가하면 되어서 언어 변환 작업이 더욱 쉬워진다는 것을 알게 되었습니다.
실행 화면