reactjs / reactjs/react-docgen
Better support for custom types
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 3.8k
- Fork
- 316
- Merge medio
- 5h 7m
- PR unite (30g)
- 4
Descrizione
This is more of a "would you be willing to accept a pull request which does this?" question than an issue of sorts. :)
I would really like to extend the functionality of "custom" types so that:
- We support destructured imports (Eg.
PropTypes.array- note the lack ofReact.) - We allow common react-esque prop type function patterns to be picked up with custom props in the same way that
arrayOfis currently handled. (Eg.PropTypes.iterableOf(PropTypes.record(User)))
Basically I feel the library should be able to support custom user prop types in such a way we don't have to reparse the raw value which would mean anyone can easily implement simple custom prop types and create documentation from that.
Custom prop types are super useful in building a real-world app with React and so I would like to see how we can help developers document these too.
We, at Lystable, want to build an open living component docs solution and are hoping react-docgen can feature at the core!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non vengono indicati file, test o punti di ingresso. Inizia individuando la gestione esistente di custom prop-type e il percorso del codice che gestisce arrayOf, quindi determina come vengono rappresentati gli import destrutturati e le funzioni personalizzate annidate. Il lavoro è completo quando entrambi i pattern richiesti sono documentati senza analizzare nuovamente il valore grezzo, con una copertura per gli esempi forniti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react, typescript
- Ambito
- documentation, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 20/100