react-navigation / react-navigation/react-navigation.github.io
Open a modal from a tab bar
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 324
- Forks
- 2k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Moved over from https://github.com/react-navigation/react-navigation/issues/3003
@spencercarli came up with this solution: https://snack.expo.io/SyJKMkFUM
We might need to change the API a bit to make it cleaner but we can document this approach for now!
- If you're suggesting a change/improvement, tell us how it should work
It would be great to get documentation done for this "open modal from tab bar" layout. I've seen it asked a bunch of times in different places as it's a very common/popular requirement.
While not as helpful as writing documentation myself, here are some of the places this was asked, to show it would be useful to have it in the official docs:
- https://stackoverflow.com/questions/46725173/react-navigation-tabnavigator-show-modal
- https://stackoverflow.com/questions/42731093/how-to-push-a-modal-screen-using-reactnavigation
- https://stackoverflow.com/questions/45520898/react-navigation-and-modal-tab-item
- https://stackoverflow.com/questions/46725173/react-navigation-tabnavigator-show-modal
- https://stackoverflow.com/questions/46106117/tabnavigator-with-a-modal-popup-with-react-navigation-like-instagram
- https://stackoverflow.com/questions/42398911/how-do-i-make-a-tabnavigator-button-push-a-modal-screen-with-react-navigation
- https://github.com/react-community/react-navigation/pull/525
- https://github.com/react-community/react-navigation/issues/314
- https://github.com/react-community/react-navigation/issues/1059
- https://github.com/react-community/react-navigation/issues/1576
- https://github.com/react-community/react-navigation/issues/2259
- https://github.com/react-community/react-navigation/issues/1734
- https://github.com/react-community/react-navigation/issues/770
@TomAtterton seems to have a solution in this issue
https://github.com/react-community/react-navigation/issues/1576
He also left the same comment here:
Anyway, best practice or not, Tom seems to have the only solution? Maybe he could give a slightly longer form answer and that can be used for docs? @spencercarli
I will try to write something up potentially.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
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
Überprüfe die verlinkte Expo Snack-Lösung sowie das zugehörige Issue und die Diskussionen auf Stack Overflow, um das vorgeschlagene Layout von Tab-Leiste zu Modal zu verstehen. Dokumentiere den Ansatz in der offiziellen Dokumentation des Projekts, einschließlich eines vollständigen Beispiels und aller API-Hinweise; abgeschlossen ist die Aufgabe, wenn Benutzer dem dokumentierten Beispiel folgen können, um ein Modal über eine Tab-Leiste zu öffnen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react-native
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100