clarify when componentDidUpdate fires
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
Re-posting this issue from facebook/react:
https://github.com/facebook/react/issues/2796
https://reactjs.org/docs/react-component.html#componentdidupdate is unclear on when it is called with regards to the render function.
The docs state that it's "Invoked immediately after updating occurs" but it is unclear what is meant with updating in this case: it can refer to either the component as a whole updating (meaning post-render), or it can refer to setState() having been processed (which might mean pre-render).
It would be good to explicitly state when this function fires in its documentation (even if somewhere else on the site this is described in text or graphic form already).
There was a PR for this that was merged at one point: https://github.com/facebook/react/pull/2801
But the current website does not include this change. I believe the language from the above PR is still correct and would be helpful to people since it's more specific than what's there currently.
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 con la sección componentDidUpdate de la URL de la documentación de componentes de React citada en el issue y compara después su redacción actual con el lenguaje al que se hace referencia en facebook/react PR #2801. Actualiza la documentación para que el momento del callback con respecto al renderizado quede explícito y verifica que la página publicada contenga esta aclaración.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react
- Área
- documentation
- Tipo de issue
- Documentación
- Dificultad
- 1/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 50/100