[Suggestion]: Correction of misleading explanation in react.dev/learn (Quick Start)
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 11.8k
- Forks
- 7.9k
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 11
Descripción
Summary
In the image above, the highlighted text implying that if statements don't work in JSX is misleading. As this is a resource that will be used by a lot of developers looking to learn React, I believe it would be beneficial to the community to clarify the information that was intended to be passed on to readers
Page
Details
As stated earlier in the page—code inside the curly braces is actually JavaScript. In the context of the highlighted text one could be led to believe that using if statements in a JSX file simply won't work or using it inside the curly braces also won't work which are both inaccurate. It is important for someone new to JSX to understand that the code inside the curly braces is supposed to be an expression.
Simply explaining that the js inside the curly braces must be an expression that returns a value, in this case—a markup should help the user better understanding why we shouldn't use an if statement directly in there.
Thank you for your time.
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.
Línea de trabajo
Comienza en la página enlazada react.dev/learn y localiza la explicación resaltada en Quick Start. Revisa la redacción circundante de JSX y JavaScript, y luego aclara la distinción entre las expresiones dentro de llaves y las sentencias if directas; la página debe explicar correctamente por qué el ejemplo está escrito de esa manera.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, react
- Área
- documentation
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 50/100