mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
The previous implementation portaled children into document.head on the client and returned null during SSR — meaning <Head> contents were absent from the prerendered HTML. React 19 ships native "document metadata" hoisting: <title> / <meta> / <link> / <style> / <script> rendered anywhere in the tree are hoisted to <head> automatically and work for both client and SSR. Studio uses <Head> exclusively for those metadata tags (verified across pages/), so the shim can simply render children and let React do the hoisting. Side effects: - SSR head content (titles etc.) now lands in the prerendered HTML. - Dedup is by element shape rather than Next's explicit key prop; observable output is equivalent for the metadata tags studio uses. - Non-metadata children (arbitrary tags) would render in place rather than in <head>. No such consumers exist today; if one shows up, swap to a portal + SSR collector. Documented in the file header.