`react-helmet` warns under `StrictMode`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Start with ADR 0015 and the migration guide’s page title section, then inspect the shell’s StrictMode wrapper and the Helmet usage described in the issue. Determine how the warning should be handled in the framework and whether the ADR’s proposed library choice is in scope. Done means the chosen approach addresses the React 18 StrictMode warning and leaves app authors with clear guidance.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
react-helmet warns under StrictMode. Every page that sets its title the way ADR 0015 prescribes prints React's UNSAFE_componentWillMount warning in the browser console, once per page load.
Found while porting Learning's progress tab (openedx/frontend-app-learning#2190).
[!NOTE]
The details below were generated by Claude (Claude Code) and reviewed before posting.
Claude Plan
How it happens today
-
An app sets its document title with
<Helmet>fromreact-helmet: ADR 0015 (status Proposed) says "Every route-level page component in an app is responsible for setting the document title. Apps do this with<Helmet>fromreact-helmet", each app declaring the dependency, and the migration guide's Set the document title on every route-level page gives the code. -
react-helmet6.1.0 buildsHelmetonreact-side-effect:withSideEffect(…)(NullComponent).react-side-effect2.1.2 wraps it in a class component namedSideEffect(NullComponent)that definesUNSAFE_componentWillMount. -
The shell renders the site inside
<StrictMode>. -
Observed on a development site running Learning's frontend-base package (
@openedx/frontend-base2.0.0-alpha.17, React 18.3.1,react-helmet6.1.0), in the browser console on loading a page:Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move code with side effects to componentDidMount, and set initial state in the constructor. Please update the following components: SideEffect(NullComponent) -
react-helmet's latest release on npm is 6.1.0, published 2020-06-08.
What the docs say
- React's
<StrictMode>reference, Fixing deprecation warnings enabled by Strict Mode: "React warns if some component anywhere inside a<StrictMode>tree uses one of these deprecated APIs:UNSAFE_class lifecycle methods likeUNSAFE_componentWillMount." - ADR 0015, Rejected alternatives, Standardizing on
react-helmet-async: "react-helmet-asyncis generally recommended overreact-helmetfor React 18+ projects: it avoidsact()warnings, supports streaming SSR, and is actively maintained." and "Standardizing onreact-helmet-asyncacross all apps is a worthwhile follow-up but does not need to block this decision". The ADR does not mention this warning. - The React 19 release post, Support for Document Metadata: "In the past, these elements would need to be inserted manually in an effect, or by libraries like
react-helmet" and "In React 19, we're adding support for rendering document metadata tags in components natively". - The
react-helmet-asyncREADME (3.1.0 on npm, peerreact16.6 to 19): "This package is a fork of React Helmet.", and under React 19, "Starting with version 3.0.0, this package detects the React version at runtime" and "you may not need this package at all — React 19's built-in metadata handling may be sufficient."
How it got here
- The ADR and the migration guide's section came in with #252 (merged 2026-04-29). The ADR takes the pattern from openedx/frontend-app-authn, which already set titles with
react-helmet(src/login/LoginPage.jsx).
Where it bites
- Learning renders
Helmetinsrc/Main.tsxandsrc/tab-page/LoadedTabPage.tsxof its frontend-base package, which is where the warning above was seen. - The same component is rendered by the route entries of the other converted apps, which were not run for this issue: account, profile, learner dashboard, instructor dashboard, admin console, gradebook, and catalog's home, catalog and course about pages.
Questions
- Does
react-helmet-asyncprint this warning under React 18.3 inStrictMode? Not tested here. - When frontend-base moves to React 19, does React's own
<title>hoisting do what ADR 0015 asks ofHelmet, including one page's title replacing another's across a client-side navigation? Not tested here. - ADR 0015 is still Proposed. Is the library it names part of what is being decided?
- Until the library changes, where does an app author following the migration guide learn that the pattern prints this warning?
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 13
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openedx/frontend-base
-
Export `SkipLink` componentAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
openedx/frontend-base#330 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
openedx/frontend-base#327 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openedx/frontend-base#210 ·
-
External routes ignore paramsPosiblemente ocupada @arbrandes la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
openedx/frontend-base#349 · 1 asignado ·
-
A site cannot override an installed app's route for a role with an external routePosiblemente ocupada @arbrandes la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
openedx/frontend-base#348 · 1 asignado ·
Todos los issues de openedx/frontend-base
Issues similares
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openclaw/openclaw#200365 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
effort: small good first issue priority: medium testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
TMHSDigital/screencast-mcp#351 ·
Los mantenedores suelen responder en 1 día
-
area-templates triage:bot-seen triage:needs-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/aspire#22356 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Archiving an agent that is not loaded keeps its old updatedAtPosiblemente ocupada @luoph la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
content triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día