Skip to content

feat: Support dangerouslySetInnerHTML on Fragments#418

Closed
rschristian wants to merge 2 commits into
mainfrom
feat/fragment-inner-html
Closed

feat: Support dangerouslySetInnerHTML on Fragments#418
rschristian wants to merge 2 commits into
mainfrom
feat/fragment-inner-html

Conversation

@rschristian
Copy link
Copy Markdown
Member

Might/probably will need work in core as well (though arguably this is more useful on the server? not sure), definitely could do with some more tests yet.

@nwalters512
Copy link
Copy Markdown
Contributor

Might/probably will need work in core as well (though arguably this is more useful on the server? not sure)

For a project that's using SSR + hydration, I'd love for this to work the same during both static rendering and on the client!

@rschristian
Copy link
Copy Markdown
Member Author

For a project that's using SSR + hydration, I'd love for this to work the same during both static rendering and on the client!

It should "hydrate" just fine as-is, by virtue of not actually having anything to hydrate; there's no hydrating non-Preact components and we don't wipe out the DOM on mismatches. Hydrating <Fragment dangerouslySetInnerHTML={{ __html: '<h1>Hello World!</h1>' }}> is basically a no-op.

@marvinhagemeister
Copy link
Copy Markdown
Member

This feature landed in #453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants