Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
배포 링크
🔗 Slack Redesign
느낀점
localStorage를 결합하니 SPA에서도 자연스러운 영속성을 만들 수 있었습니다./dms/:roomId경로와messages-${roomId}키 분리를 통해, 새로고침이나 다른 탭에서 같은 URL로 들어와도 대화 내용이 그대로 유지되도록 구현했습니다.useState로, 메시지 영속화는localStorage로 분리하여 굳이 전역 상태 라이브러리를 도입하지 않았습니다. 작은 프로젝트라도 상태 관리 전략을 처음부터 명확히 정해두는 것이 중요하다는 것을 배웠습니다.Review Questions
1. React Router의 동적 라우팅(Dynamic Routing)이란?
URL 경로의 일부를 변수처럼 받아서 같은 컴포넌트가 파라미터에 따라 다른 데이터를 렌더링하도록 하는 라우팅 방식입니다. 정적으로 모든 경로를 일일이 정의하지 않고,
:param형태의 placeholder로 매칭합니다.언제 사용하는가
/dms/room-1)가 되어 공유·새로고침에도 같은 화면 복원이 가능해야 할 때본 프로젝트에서는
/dms/:roomId로 채팅방을 식별하여, URL만으로 특정 방을 직접 열 수 있게 구현했습니다.2. 느린 네트워크 환경에서의 UX 개선 전략
UI/UX 디자인 전략
기술적 최적화
React.lazy,Suspense)로 초기 번들 축소loading="lazy",srcset으로 적절한 해상도 제공3.
useState/useReducervs Context API / 전역 상태 라이브러리useStateuseReduceruseState— 토글, 입력값처럼 로직이 단순하고 한 컴포넌트에 닫혀 있을 때 사용useReducer— 상태 전이가 여러 액션 타입으로 분기되거나, 다음 상태가 이전 상태에 의존하는 등 로직이 복잡할 때 적합합니다. action 단위로 의도가 명시적이라 테스트·디버깅에 유리Context API —
props drilling을 피하기 위한 값 전달 메커니즘이지 상태 관리 도구가 아닙니다. 값이 자주 바뀌면 Provider 하위 전체가 리렌더되므로 테마·로케일·인증 정보처럼 변경이 드문 값에 적합전역 상태 라이브러리 (Redux, Zustand, Jotai 등) — 다음 요구가 동시에 필요할 때 도입