themesberg / themesberg/flowbite-react
Nextjs server components with carousel as child client component does not work on first render
Open
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
- Create a simple nextjs app having a main page (server component) with a child element that is "use client" and renders a simple Carousel
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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