reactjs / reactjs/react.dev

Improve local development instructions in the tutorial

Aperta
#1,658 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
11.8k
Fork
7.9k
Merge medio
1g 11h
PR unite (30g)
11

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con la sezione “Setup for the Tutorial” del tutorial all’URL collegato e confronta le istruzioni sull’eliminazione dei file in src con gli esempi di codice successivi. Verifica la posizione documentata di ShoppingList e Square e il flusso di npm start; il lavoro è completo quando una nuova app può seguire le istruzioni e visualizzare il codice del tutorial senza dover tirare a indovinare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, react
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.