themesberg / themesberg/flowbite-react

Nextjs server components with carousel as child client component does not work on first render

Open
#956 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

:bug: bug confirmed
Dominant language
TypeScript
Stars
2.1k
Forks
506
PR merge metrics
No merged PRs in 30d

Description

  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Steps to reproduce

  1. Create a simple nextjs app having a main page (server component) with a child element that is "use client" and renders a simple Carousel
  2. Try to navigate the carousel, everything seems to work except the scrolling of the items, so visibly it looks like the carousel doesn't work at all

Current behavior

No scroll of the carousel visible at first render, when browsing to another page and coming back to the page with the carousel, it suddenly works fine.

Expected behavior

Should scroll

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in a simple Next.js app with a server-component page and a "use client" child rendering a Carousel. Start by tracing the Carousel's first-render behavior; done means its items visibly scroll immediately, without navigating away and back.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.