arrow_backBACK TO DRILLS
Black BeltssrPREMIUM
The Header That Broke the Cache
The team expected this route to be statically generated at build time.
REACT_MODULE // 0x42
import { headers } from 'next/headers';
export default async function ProductPage() {
const headersList = headers();
const userAgent = headersList.get('user-agent');
const res = await fetch('https://api.example.com/products');
const products = await res.json();
return <ProductList products={products} userAgent={userAgent} />;
}What actually happens to this route's rendering strategy?