Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use your router’s data-fetching workflow to build pages from API or CMS content: in the Pages Router, fetch page data with getStaticProps and choose dynamic paths with getStaticPaths; in the App Router, fetch in an async Server Component and define dynamic paths with generateStaticParams. Then choose how generated data stays fresh—at build time only, on a revalidation schedule, after an on-demand invalidation, or at request time. Check the documentation for your installed Next.js version because caching defaults and options can change.

Choose the workflow for your router

First identify whether the page lives under pages/ or app/. These routers use different APIs for static generation; do not mix their functions. A CMS is simply the source of data, not a separate rendering mode. Whether you use a CMS API, another HTTP API, or a database client, fit its data access into the router’s build, cache, and refresh lifecycle.

Application Fetch page data Define dynamic routes What happens during ISR
Pages Router (pages/) getStaticProps runs at build time and supplies data as page props. Next.js Pages Router SSG guide getStaticPaths returns routes for a dynamic page to prerender. Next.js Pages Router dynamic paths guide Choose a regeneration strategy when generated output must be updated after the build. Next.js Pages Router SSG guide
App Router (app/) Fetch in an async Server Component, such as a page component. Next.js App Router fetching guide generateStaticParams returns objects with values for the dynamic segments. Next.js generateStaticParams reference generateStaticParams is not called again during ISR; data and route freshness must be handled separately. Next.js generateStaticParams reference

Pages Router: fetch content and prerender routes

Fetch records with getStaticProps

For a page whose content comes from external data, export getStaticProps from its file under pages/. Next.js runs it at build time and passes the returned data to the page component as props. The official SSG guide demonstrates this pattern with a CMS-backed blog. Read the Pages Router SSG guide.

Conceptually, the page loads the records in getStaticProps, returns the values needed to render, and renders those props in its component. Keep the data needed for the page in the returned props; the static HTML is built from that result. When content only needs to reflect the source as it existed at build time, no later regeneration is required.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Use getStaticPaths when slugs determine URLs

For a dynamic page such as pages/blog/[slug].tsx, export getStaticPaths to identify which slugs Next.js should prerender. Fetch the relevant list from the API or CMS and map each record to a path parameter matching the filename. The page’s getStaticProps can then use the slug to retrieve the content for that route. See the dynamic paths guide.

Static generation is a good fit when pages can be prepared before a request. If the content must be fetched separately for each request, the Pages Router overview distinguishes that request-time approach from static generation; if static output needs later updates, use incremental static regeneration (ISR). Compare Pages Router data-fetching strategies.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

App Router: fetch in Server Components and generate dynamic params

Fetch data in an async Server Component

In the App Router, a page or other Server Component can be asynchronous, await fetch, and use the returned data to render. The fetching guide also covers asynchronous I/O through an ORM or database. Identical fetch requests in a React component tree are memoized, while uncached requests can hold up rendering until they resolve. Use a streaming boundary such as loading.js or <Suspense> when surrounding UI should render while slower data is pending. Read the App Router fetching guide.

Map API records to generateStaticParams

For a route such as app/blog/[slug]/page.tsx, export generateStaticParams and return an array of objects whose keys match the dynamic segment names. For example, a [slug] segment needs objects shaped like {"slug":"example-post"}. Fetch the record list and map its slugs or IDs into that array; Next.js uses the returned values to generate those route variants at build time. See the generateStaticParams reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

This is the App Router counterpart to Pages Router getStaticPaths, but it has an important lifecycle distinction: Next.js does not call generateStaticParams again during ISR. Regenerating a page therefore does not automatically refresh the set of generated route parameters. The API reference also describes behavior for unlisted parameters through dynamicParams. If using Cache Components, an empty array from generateStaticParams causes a build error; at least one parameter is required in that mode. Check the current route-generation details.

Choose how content stays fresh

Static generation determines when a page is prepared; caching and revalidation determine how long its data or output can remain in use. Do not assume a default from memory: Next.js caching behavior has changed across versions and may depend on rendering mode. Verify the documentation that matches the version installed in your project.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Build-only content

If content changes rarely and can wait for the next deployment, generate it at build time and do not configure periodic or event-driven regeneration. This is the simplest lifecycle, but it means an edit in the CMS does not by itself update the deployed page.

Timed regeneration with ISR

For content that should refresh periodically, use the revalidation mechanism for your router and version. The App Router ISR guide shows an example using revalidate = 60; that is an illustrative interval, not a universal recommendation. It also describes an hourly example in which the next visitor receives the cached stale page while Next.js generates a fresh version in the background. Choose an interval based on how quickly edits must appear and how frequently pages are requested. Read the App Router ISR guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

On-demand invalidation after an edit

When a CMS change should trigger refresh without waiting for a timer, the App Router ISR guide documents revalidatePath for invalidating a route and revalidateTag for targeting tagged data. The documented behavior is regeneration on the next request after invalidation; do not treat invalidation as a promise of an immediate rebuild. For ORM or database work, the same guide shows unstable_cache as a caching option. Review the ISR and invalidation guidance.

Request-time data or uncached fetches

When each request must retrieve fresh data, the App Router’s extended server-side fetch accepts cache: 'no-store'. For cache lookup, the docs describe cache: 'force-cache'; for a defined cache lifetime, use next: { revalidate: seconds }. These choices have distinct meanings, and should be made intentionally rather than combined by habit. Check the current fetch options.

These fetch options apply to Next.js’s extended server-side fetch behavior. A database or ORM client does not automatically inherit those options; use the cache and revalidation approach documented for the relevant router and framework version.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan route volume and unknown paths

Returning every record from a large CMS means more route variants are prepared during the build. If build duration or record volume makes that impractical, consider generating only a subset and determine what the installed version does when a visitor requests a parameter that was not returned. In the App Router, dynamicParams controls behavior for unspecified dynamic segments; consult its current documentation before relying on runtime generation or blocking behavior. Cache Components impose the empty-array restriction noted above. Review the route-parameter options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use all known paths when the collection is manageable and every page should be ready at deployment.
  • Use a subset when build cost matters, but explicitly decide how missing parameters are handled.
  • Separate route discovery from page-data freshness: in the App Router, ISR does not rerun generateStaticParams.

Verify behavior against your installed Next.js version

Next.js behavior evolves, especially caching defaults. Confirm the installed version and consult its matching documentation before choosing a cache mode, revalidation period, or unknown-route behavior. The current documentation pages cited here include update dates ranging from February to August 2026, so a project on another version may behave differently. The key design decision remains: select the router API for generating pages, then separately choose when data and routes are refreshed.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.