Skip to content

Commit 2f97807

Browse files
authored
add comment about connection()
1 parent 42edc83 commit 2f97807

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

examples/next-partial-prerendering/components/pricing.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { cookies } from 'next/headers';
1414
import { getProduct } from '#/lib/products';
1515

1616
async function AddToCartFromCookies() {
17+
// Tell Next.js to render dynamically at runtime instead of build-time
1718
await connection();
1819

1920
// Get the cart count from the users cookies and pass it to the client

examples/next-partial-prerendering/components/recommended-products.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { delayRecommendedProducts, withDelay } from '#/lib/delay';
55
import { getProducts } from '#/lib/products';
66

77
export async function RecommendedProducts() {
8+
// Tell Next.js to render dynamically at runtime instead of build-time
89
await connection();
910

1011
let products: Product[] = await withDelay(

examples/next-partial-prerendering/components/reviews.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { delayReviews, withDelay } from '#/lib/delay';
55
import { getReviews } from '#/lib/reviews';
66

77
export async function Reviews() {
8+
// Tell Next.js to render dynamically at runtime instead of build-time
89
await connection();
910

1011
let reviews: Review[] = await withDelay(

examples/next-partial-prerendering/components/single-product.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Image from 'next/image';
66
import { getProduct } from '#/lib/products';
77

88
export async function SingleProduct() {
9+
// Tell Next.js to render dynamically at runtime instead of build-time
910
await connection();
1011

1112
const product: Product = await getProduct({ id: '1' }).then((res) =>

0 commit comments

Comments
 (0)