Tutorial: make clear warnings are to be found in dev console
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 11.8k
- Forks
- 7.9k
- Merge moyen
- 1 j 11 h
- PR mergées (30 j)
- 11
Description
I'm completely new to react and when I tried following https://reactjs.org/tutorial/tutorial.html , everything went smoothly except at the part before "Picking a Key" where it says
For now, we should see a list of the moves that have occurred in the game and a warning that says:
Warning: Each child in an array or iterator should have a unique “key” prop. Check the render method of “Game”.
I didn't realize codepen example had secretly overridden console.log to display the error msg in the page itself, so I thought I should be seeing the warning on my test page as well. I spent a long time looking for it, reexamining my code and setup, etc etc, and finally ended up asking and getting an answer on stackoverflow.
It's silly how the simplest things can become impossible hurdle for beginners who are learning on their own. I think a clarification that 1. for people following along with their own dev environment, this is to be found in the browser's developer console, and 2. the codepen example had changed console.log behavior but that's not the default to be expected.
Thank you very much.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par la section du tutoriel React qui précède immédiatement « Picking a Key » et comparez l’exemple CodePen avec les instructions pour un environnement de développement local. Précisez que l’avertissement apparaît dans la console de développement du navigateur et que CodePen surcharge console.log pour l’afficher dans la page ; le travail est terminé lorsque les débutants sont peu susceptibles de chercher l’avertissement dans leur page.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, react
- Domaine
- documentation
- Type d'issue
- Documentation
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100