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단계 - 팀 서비스의 일부 페이지 클론 코딩
🚀 구현한 페이지의 주소와 방식
✅ 체크리스트
선택한 렌더링 방식의 이유
SSR 랜더링 방식을 사용했습니다.
기존의 코끼리끼리 프로젝트는 같이 styled-components를 사용해서 NextJS로 마이그레이션을 했습니다
하지만 NextJS에서 styled-components를 사용하기 위해서는 'use client'를 선언해줄 필요가 있었고, 그로인해 API 요청은 client 에서 진행했습니다
위의 이유로 모든 컴포넌트는
jsx
의{ }
로 감싸져있지 않은 부분을 서버에서 렌더링 후, 자바스크립트 다운로드가 완료되면 추가적으로 client 에서 렌더링을 수행하게 됩니다코드 재사용
기존 서비스에서 사용중인 styled-components를 도입하는 것으로 모든 컴포넌트를 재사용할 수 있었습니다
기존 서비스에서 사용하는 모든 컴포넌트들을 재사용했습니다. 데이터 패칭부분은, fetch함수를 사용했고, 현 서비스 서버에 요청을하면 cors에러가 나서 정적파일 json을 패칭해오는 방식을 선택했습니다!