themesberg / themesberg/flowbite-react

MegaMenu doesn't use SSR for dropdown content

Open
#1,403 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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. Copy Mega Menu Default Example (server.tsx) to into Next.js Server Component (v14.2.2)
  2. "View source" in browser

Current behavior

The content of the dropdown is only rendered when interacting with the dropdown trigger.

Expected behavior

The content of the dropdown should be pre-rendered on the server and hidden on page load.

Context

Hiding substantial parts of a site's main navigation can have terrible effects to search engine's indexability.

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

Start with the Mega Menu Default Example in the Flowbite React docs and reproduce it in a Next.js 14.2.2 Server Component; inspect the rendered source before and after opening the trigger. Done means the dropdown content is present in the server HTML and hidden on initial load while remaining usable when opened.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.