[Suggestion]: portals caveat
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
Summary
The problems solved by portals can also be solved by the dialog element, popover API and anchor positioning.
I think it is worth mentioning that on the page less people think the only approach is to use portals.
Page
https://react.dev/reference/react-dom/createPortal
Details
I wrote about it here: https://fullystacked.net/portal/
I don’t think native popovers are perfect. There will probably always be a need for this portal API, but I think the main example shouldn’t be a modal. That genuinely is better solved with the native HTML element.
I’m not suggesting a large new section, just a brief note to say there are other approaches.
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
Öffne die im Issue verlinkte React DOM createPortal-Referenzseite und überprüfe ihr Modal-Beispiel sowie die umgebende Erklärung. Füge eine kurze Anmerkung hinzu, die Dialoge, Popovers und die Positionierung von Ankern als native Alternativen anerkennt, und überprüfe anschließend, dass die Seite Portale klar als eine Option und nicht als den einzigen Ansatz darstellt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- html, react
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 55/100