Runtime data 실전 서브앱
runtime API는 요청 컨텍스트 전용이므로 Suspense + 경계 분리가 필요합니다.
API 종류와 same-scope/추출 전달 전략을 바꿔 동작 차이를 확인해보세요.
파일 구조
cache-components/runtime-data/ |- page.tsx \- demo/ \- page.tsx
핵심 코드
const cookieStore = await cookies() const headerStore = await headers()
실전 점검 체크리스트
- - runtime 접근은 Suspense 안에서 수행
- - 값 추출 후 cached 함수로 전달
- - same-scope 혼합 금지