Notifying the readers about the change in default value in context example
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 11.8k
- Forks
- 7.9k
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
The example given for context (Passing Data Deeply with Context) starts with a default value of 1. Later on, for explaining 'Using and providing context from the same component', it is changed to 0 and remains the same for a later subtopic too.
While I was going through the example, I was left confused about how the code (shown in the below screenshot) is working given that the default value is set to 1 until I checked the 'LevelContext.js'.
While one can look at the 'LevelContext.js' and check, I think it would be better to make readers aware of the change! We can add a small sentence like 'Note that the default value is changed to 0'
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne im Beispiel „Passing Data Deeply with Context“ und vergleiche dessen angezeigten Standardwert mit LevelContext.js. Lies anschließend den Unterabschnitt „Using and providing context from the same component“. Füge dort, wo das Beispiel auf 0 geändert wird, eine kurze Anmerkung hinzu und bestätige, dass der spätere Unterabschnitt mit dieser Erklärung weiterhin konsistent ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 55/100