0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/.github
Brenley Dueck 129d043f2d
fix(solid-router): prevent HeadContent hydration warnings (#7510)
* fix(solid-router): prevent HeadContent hydration warnings and navigation FOUC

Fix two related issues with HeadContent in solid-router:

1. Hydration: render bare element templates with one getNextElement per
   invocation (switch instead of if/return), call hydration-affecting
   hooks unconditionally, and capture the relocated node via the JSX
   return value instead of a ref attribute so SSR attributes on void
   meta/link elements are preserved. Eliminates "unclaimed
   server-rendered node" warnings.

2. FOUC: stabilize head tag object identity per-key across renders so
   <For> (which keys by reference) reconciles unchanged tags in place
   instead of remounting every head node on navigation. Previously a
   single changed tag (e.g. title) invalidated the whole array,
   remounting the app stylesheet link and briefly detaching it, causing
   a flash of unstyled content in dark mode.

* chore: add changeset

* fix(solid-router): preserve CSP nonce on styles

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
History 2026-05-31 00:41:10 +02:00
..
ISSUE_TEMPLATE Upgrade to solidjs beta.14 (#7415) 2026-05-23 01:19:28 +02:00
workflows fix(solid-router): prevent HeadContent hydration warnings (#7510) 2026-05-31 00:41:10 +02:00
CODEOWNERS Upgrade to solidjs beta.14 (#7415) 2026-05-23 01:19:28 +02:00
FUNDING.yml workflows 2021-10-20 10:50:40 -06:00
renovate.json Upgrade to solidjs beta.14 (#7415) 2026-05-23 01:19:28 +02:00