Next.js Discord

Discord Forum

Pass down parent height inside <Suspense>

Answered
Dutch posted this in #help-forum
Open in Discord
DutchOP
my setup:

<div className="mx-10 flex flex-col min-h-[100vh]">
      <div className="flex flex-1 bg-blue-500"> <--takes up full viewport height, all good
        <Suspense
          key={optimistic_state_a * 10 + optimistic_state_b}
          fallback={
            // fallback div
          }
        >
          <div className="h-full flex-1 border"> < does not take up full viewport height!!
          </div>
        </Suspense>
      </div>
    </div>


how can I make the child in suspense go the full height of the parent?
Answered by Dutch
I solved it.
The parent (second div from the top) was set to flex, not flex-col
View full answer

1 Reply

DutchOP
I solved it.
The parent (second div from the top) was set to flex, not flex-col
Answer