
[Next.js 14] 1. Routing - 2
·
Skill/Next.js
3. Linking and NavigatingNext.js에서 route 간 네비게이션 방법에는 4가지가 존재.1. 2. useRouter hook (Client Components)3. redirect function (Client Components) 4. History API3-1. Link ComponentHTML 태그를 확장한 내장 컴포넌트로 prefetching과 client-side에서 route 간 네비게이션 기능 제공.prefetching: 사용자가 방문하기 전에 background에서 해당 페이지의 정적 데이터 (JS, CSS 등)를 미리 로드하는 것.1. Link Component: 컴포넌트가 사용자 ViewPort 내 들어오면, prefetching 수행.2. router.pref..