Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Document Metadata in Preact #4695

Open
alcompilor opened this issue Feb 18, 2025 · 0 comments
Open

Support for Document Metadata in Preact #4695

alcompilor opened this issue Feb 18, 2025 · 0 comments

Comments

@alcompilor
Copy link

With the release of React 19’s support for document metadata, managing <title>, <meta>, and other head elements has become convenient, it eliminated the need to use packages like react-helmet to manage these tags. However, when attempting to use preact/compact in my vite.config.ts to render my components, I encountered an issue:

While most functionality worked as expected, metadata tags defined within my pages were not handled correctly. Instead of being embedded in the document <head>, they were rendered inside the body section of my components. This behavior is undesirable and could impact proper SEO and metadata management.

I wanted to check if Preact plans to introduce support for document metadata, similar to React 19. This would be a valuable addition that would make it easier for developers to manage metadata seamlessly when leveraging Preact’s performance benefits.

Would love to hear your thoughts on this!
Thanks for all your great work.

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

No branches or pull requests

2 participants