Please enable JavaScript.
Coggle requires JavaScript to display documents.
Next.js, image - Coggle Diagram
Next.js
-
Linking & Navigating
-
-
-
-
Disable Scroll: <Link scroll={false}>, router.push('', { scroll: false })
-
Data Fetching Patterns
-
-
-
-
Using React cache, server-only, and the Preload Pattern
-
-
Dynamic Routes, [folderName], [id], [slug]
-
-
-
-
-
-
Parallel Routes
-
-
Parallel routes are created using named slots, folder, are passed to the same level layouts as props
-
-
-
Error Handling
-
handle errors in layouts
-
global-error.js handle errors in root layout/template, app/global-error.js, must define <html> and <body>
Revalidating Data
Time-based
fetch('', { next: { revalidate: 3600 } })
-
On-demand, Server Acton or Route Handler
-
revalidateTag, fetch('', { next: { tags: ['collection'] } })
-
Caching Data
fetch('', { cache: 'force-cache' })
-
Intercepting Routes, display the content of a route without switching to a different context, intercept /photo/123, overlays it over /feed
-
-
-
-