Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why every client component is wrapped by Suspense #1387

Open
nabildroid opened this issue Oct 17, 2024 · 0 comments
Open

why every client component is wrapped by Suspense #1387

nabildroid opened this issue Oct 17, 2024 · 0 comments

Comments

@nabildroid
Copy link

many places where the page or layout is server side rendered, and it uses a client component, the client component is wrapped by Suspense

in product/[handle]

<Suspense
              fallback={
                <div className="relative bg-red-900 aspect-square h-full max-h-[550px] w-full overflow-hidden" />
              }
            >
              <Gallery
                images={product.images.slice(0, 5).map((image: Image) => ({
                  src: image.url,
                  altText: image.altText
                }))}
              />
            </Suspense>
          </div>

          <div className="basis-full lg:basis-2/6">
            <Suspense fallback={null}>
              <ProductDescription product={product} />
            </Suspense>
          </div>
<div className="hidden justify-center md:flex md:w-1/3">
          <Suspense fallback={<SearchSkeleton />}>
            <Search />
          </Suspense>
        </div>

i asked v0 and told me is mistake ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant