[Typo]: The mechanism described in "Providing a fallback for server errors and client-only content" behaves differently in practice
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- javascript, react
- Área
- documentation
Línea de trabajo
Comienza con la sección de referencia de React Suspense “Providing a fallback for server errors and client-only content”, especialmente con las dos afirmaciones citadas sobre los errores del servidor y la opción de no usar el renderizado del lado del servidor. Reproduce o verifica el comportamiento informado en desarrollo y producción, incluido el error 419, y luego actualiza la sección para que su explicación coincida con el comportamiento observado y exponga claramente cualquier limitación o enfoque compatible.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The section "Providing a fallback for server errors and client-only content" could be misleading when it comes to opting out of server-rendering.
Page
Details
The section "Providing a fallback for server errors and client-only content" seems to suggest that if a user wants to explicitly opt out a component/hook out of being rendered on the server, they can throw an error on the server, and when that same component successfully renders on the client, the error will not be surfaced to the user. I am specifically talking about the following statements:
However, if it does not error on the client, React will not display the error to the user since the content was eventually displayed successfully.
You can use this to opt out some components from rendering on the server. To do this, throw an error in the server environment and then wrap them in a boundary to replace their HTML with fallbacks:
That seems to be in opposition to how React behaves in practice. Both in development and in production, the error thrown on the server is surfaced to the developer, and (arguably) the end user through the browser console (Minified error description: https://react.dev/errors/419).
The seems to be no documented way to distinguish an intended opt-out from a user error, and if there is none, I feel like the documentation is a bit misleading.
- Lenguaje dominante
- JavaScript
- Estrellas
- 11.8k
- Forks
- 7.9k
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 11
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 reactjs/react.dev
-
type: documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
-
bug: unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
type: typos
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
bug: unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Todos los issues de reactjs/react.dev
Issues similares
-
code-quality refactoring
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100