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.
과제 체크포인트
배포 링크
vanilla: https://hanghae-plus.github.io/front_6th_chapter4-1/vanilla/
react: https://hanghae-plus.github.io/front_6th_chapter4-1/react/
기본과제 (Vanilla SSR & SSG)
Express SSR 서버
<!--app-html-->,<!--app-head-->)서버 사이드 렌더링
클라이언트 Hydration
window.__INITIAL_DATA__스크립트 주입Static Site Generation
심화과제 (React SSR & SSG)
React SSR
renderToString서버 렌더링React Hydration
Static Site Generation
구현 과정 돌아보기
가장 어려웠던 부분과 해결 과정
1. 서버-클라이언트 상태 동기화 문제
문제 상황:
window.__INITIAL_DATA__가 제대로 전달되지 않아 클라이언트에서 빈 상태로 시작해결 과정:
window.__INITIAL_DATA__확인 →undefined발견</head>태그 찾지 못함)2. Universal 코드 작성 - window 객체 참조 에러
문제 상황:
해결 과정:
useLoadProductDetail훅에서 서버 실행 시 에러3. Hydration 불일치 - React Hydration Warning
문제 상황:
해결 과정:
구현하면서 새롭게 알게 된 개념
서버-클라이언트 상태 동기화의 복잡성
Hydration 불일치 문제와 해결법
window객체 존재 여부 체크의 중요성SSG와 SSR의 트레이드오프
Universal 코드 작성의 어려움
성능 최적화 관점에서의 인사이트
학습 갈무리
Q1. 현재 구현한 SSR/SSG 아키텍처에서 확장성을 고려할 때 어떤 부분을 개선하시겠습니까?
Q2. Express 서버 대신 다른 런타임(Cloudflare Workers, Vercel Edge Functions 등)을 사용한다면 어떤 점을 수정해야 할까요?
Vercel Edge Functions 적용 시:
fs모듈 → Vercel의 파일 시스템 API로 교체Cloudflare Workers 적용 시:
Q3. 현재 구현에서 성능 병목이 될 수 있는 지점은 어디이고, 어떻게 개선하시겠습니까?
병목 지점:
개선 방안:
Q4. 1000개 이상의 상품 페이지를 SSG로 생성할 때 고려해야 할 사항은 무엇입니까?
Q5. Hydration 과정에서 사용자가 느낄 수 있는 UX 이슈는 무엇이고, 어떻게 개선할 수 있을까요?
현재 UX 이슈:
개선 방안:
Q6. 이번 과제에서 학습한 내용을 실제 프로덕션 환경에 적용할 때 추가로 고려해야 할 사항은?
보안:
모니터링:
배포:
Q7. Next.js 같은 프레임워크 대신 직접 구현한 SSR/SSG의 장단점은 무엇인가요?
직접 구현의 장점:
직접 구현의 단점:
Q8. Next.js 를 이용하여 SSG 방식으로 배포하려면 어떻게 해야 좋을까요?
코드 품질 향상
자랑하고 싶은 구현
2. XSS 방지 데이터 직렬화
개선하고 싶은 부분
현재 한계점
리팩토링 계획
리팩토링 계획
학습 연계
다음 학습 목표
실무 적용 계획
리뷰 받고 싶은 내용