React Helmet
A reusable React component for managing changes to the document head
Repository Health
Technical Analysis
React Helmet lets components declare document <head> tags — title, meta, link, script, style, base, and noscript — as regular JSX, and manages the resulting side effects on the actual DOM <head>. Nested or updated Helmet components later in the render tree override earlier ones, so a page-level layout can set defaults while individual routes or components override just the fields they need (e.g. the page title).
It supports both client-side rendering, where it patches the live document head as components mount/unmount, and server-side rendering, where Helmet.renderStatic() produces head tag strings that can be injected into an HTML template. This dual-mode support made it a common choice for React apps needing SEO-relevant head management before React 19 added native support for rendering head tags directly from components.
What You Get
- A
<Helmet>component supporting title, meta, link, script, style, base, and noscript tags as plain JSX props/children - Nested-override semantics: a Helmet rendered deeper in the tree overrides matching tags set by an ancestor Helmet
- Server-side rendering support via
Helmet.renderStatic(), returning renderable head-tag strings for SSR pipelines - Attribute support on
<html>and<body>tags (e.g. setting alangorclassattribute) alongside head tags - A declarative
HelmetDataAPI for isolating head state per-request in multi-request SSR environments
Common Use Cases
- Setting per-page
<title>and meta description tags in a React SPA for SEO and social-sharing previews - Server-rendered React apps injecting head tags collected via
renderStatic()into an HTML shell template - Multi-tenant or white-label apps overriding
<html lang>or theme-related<body>classes per route - Component libraries that want to inject shared
<link rel="preconnect">or analytics<script>tags without editing a central HTML template
Under The Hood
Architecture - The library is deliberately small and centers on three files: Helmet.js defines the public React component and its lifecycle (mount/update/unmount hooks that trigger head reconciliation), HelmetUtils.js contains the core diffing and DOM-patching logic that computes which tags changed and applies them to the real document.head/document.body, and HelmetConstants.js centralizes the list of supported tag names and attribute keys. The nested-override behavior is implemented by tracking a stack of Helmet instances and flattening them into one final tag set whenever any instance mounts, updates, or unmounts.
Tech Stack - A plain JavaScript (100% JS, no TypeScript) React library published as both CommonJS (lib/) and ES module (es/) builds. It has no significant runtime dependencies beyond React itself and react-fast-compare for efficient prop diffing, keeping its footprint minimal — appropriate for a library that runs on every page navigation.
Code Quality - Test coverage lives in a top-level test/ directory rather than colocated with source, split into HelmetTest.js (imperative API) and HelmetDeclarativeTest.js (JSX-declarative API), covering both usage styles the library supports. The codebase has had no commits since mid-2023 and no releases since 2020’s 6.1.0 — it is effectively unmaintained, though its small, stable surface area means the existing code continues to work for the React versions it targets (up through the legacy class-component/context API era).
API Design - The API is intentionally close to writing raw HTML head tags as JSX (<title>My Page</title>, <meta name="description" content="..." />), which keeps the learning curve minimal for anyone already familiar with HTML head elements. The override-by-nesting model is implicit rather than configured, which is easy to reason about in simple layouts but can surprise developers in deeply nested component trees where it’s not obvious which Helmet instance “wins” for a given tag.
Used by 18 apps in this directory
NocoBase
Low Code Platforms · No Code Platforms
Open-source AI + no-code platform that lets coding agents and people collaborate to build business systems fast on proven infrastructure.
Plasmic
CMS · Design Tools · Low Code Platforms
The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.
Refly
AI Development · Automation · No Code Platforms
Build deterministic, versioned agent skills from natural language—run them anywhere from Claude Code to Slack.
shaper
Analytics · Data Engineering
Build analytics dashboards, reports, and customer-facing analytics by writing pure SQL — powered by DuckDB and designed for self-hosted deployment.
strapi
CMS
Open-source headless CMS that auto-generates REST and GraphQL APIs from your content models, with a fully customizable admin panel you control.
Tianji
Analytics · Monitoring
Replace Google Analytics, UptimeKuma, and Prometheus with one self-hosted platform that tracks websites, monitors uptime, and reports server health.
Tolgee
Developer Tools
In-context localization platform that lets developers and translators edit app strings directly in the running application, with AI-powered machine translation and framework SDKs for React, Angular, Vue, and Svelte.
Webiny JS
Blogging · CMS · Ecommerce
Open-source, self-hosted CMS on AWS serverless — a TypeScript framework you extend with code, not a product you configure through a UI.
Wire
Collaboration · Team Chat · Video Conferencing
Open source end-to-end encrypted messaging for teams and enterprises — self-host for complete control over your communications and data.