reactjs / reactjs/react.dev

Improve local development instructions in the tutorial

Offen
#1,658 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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

I'm trying to get started with the easiest example from the tutorial at https://reactjs.org/tutorial/tutorial.html#setup-for-the-tutorial for some hours now. I desperately looking for the location where to put the ShoppingList, Square`, etc. classes. I invested some time in understanding the terms, but it always falls back to the contradiction in the instructions

Delete all files in the src/ folder of the new project

and

Note:
Don’t delete the entire src folder, just the original source files inside it. We’ll replace the default source files with examples for this project in the next step.

This is the same as

Delete the original source files in src.

right (where the attribute original is still unclear because all files are original after creating the app with npx)? If not, I'm not getting it after reading it the fifth time.

Furthermore, I don't find any instructions where to put the code in the tutorial. My only guess is src/index.js, but that doesn't lead to the code being displayed after npm start.

I think that creating the app with content and then deleting it is a worse approach than build the application from scratch. Unfortunately, dependencies and tools like package managers seem to be already designed more as soon-to-be outdated rather than doing one good job for a long time in the "frontend world" - which is why most other tutorials on React going the way to build from scratch are outdated these days. The solution for this problem would be to simply put the tutorial commands in a CI script and test them periodically.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie mit dem Abschnitt “Setup for the Tutorial” des Tutorials unter der verlinkten URL und vergleichen Sie die Anweisungen zum Löschen von Dateien in src mit den späteren Codebeispielen. Überprüfen Sie die dokumentierte Platzierung von ShoppingList und Square sowie den Ablauf von npm start; die Arbeit ist abgeschlossen, wenn eine neue App den Anweisungen folgen und den Tutorial-Code anzeigen kann, ohne dass geraten werden muss.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, react
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.