themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.77k stars 395 forks source link

MegaMenu doesn't use SSR for dropdown content #1403

Open jancbeck opened 1 month ago

jancbeck commented 1 month ago

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.

SutuSebastian commented 1 month ago

CC @tulup-conner