How react-helmet-async behaves with React 19
mainStarting with version 3.0.0, the package detects React 19 at runtime and changes its behavior to leverage React's native metadata hoisting:
React 19+:
<Helmet>renders actual DOM elements, and React handles hoisting them to<head>.<HelmetProvider>becomes a transparent passthrough.- Note:
htmlAttributesandbodyAttributesare still applied via direct DOM manipulation. - Note: The
contextobject will not be populated with helmet state on React 19. If you rely oncontextfor SSR, render tags directly in your component tree instead. - Note: The
prioritizeSeoTagsflag andhelmetDataprop are ignored.
- Note:
React 16–18: The existing behavior is preserved where
<Helmet>collects tags, deduplicates them, and applies them via manual DOM manipulation (client) or serialization (server).