Skip to content

Commit

Permalink
fix(react): fix Vite dev CSS hydration errors (#7812)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Oct 30, 2023
1 parent 82b0aca commit 28ac1db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/kind-pandas-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Fix critical CSS hydration errors for Vite dev
4 changes: 3 additions & 1 deletion packages/remix-react/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ export function Links() {

return (
<>
{criticalCss ? <style>{criticalCss}</style> : null}
{criticalCss ? (
<style dangerouslySetInnerHTML={{ __html: criticalCss }} />
) : null}
{keyedLinks.map(({ key, link }) =>
isPageLinkDescriptor(link) ? (
<PrefetchPageLinks key={key} {...link} />
Expand Down

0 comments on commit 28ac1db

Please sign in to comment.