RSC 경계와 props 전달 규칙 구조
경계
Server ComponentDB, 파일 시스템, async fetch 가능
직렬화 props문자열, 숫자, 배열, plain object
Client Componentstate, effect, event handler 담당
children 패턴서버 UI를 클라이언트 shell 안에 슬롯으로 전달
Server Component→직렬화 props→Client Component→children 패턴
RSC 경계와 props 전달 규칙 기준
점검
서버서버 컴포넌트는 클라이언트 컴포넌트를 import할 수
있습니다.
클라이언트클라이언트 파일이 서버 전용 모듈을 import하면 번들 경계가
깨집니다.
함수,함수, class instance, DB 연결 객체는 props로 넘기지
않습니다.
상호작용상호작용 shell은 작게 만들고 데이터 로직은 서버에 둡니다.