react-navigation / react-navigation/react-navigation.github.io

Open a modal from a tab bar

Đang mở
#27 15 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

help wanted
Ngôn ngữ chính
JavaScript
Star
324
Fork
2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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:

@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:

https://stackoverflow.com/questions/42398911/how-do-i-make-a-tabnavigator-button-push-a-modal-screen-with-react-navigation

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Xem xét giải pháp Expo Snack được liên kết, issue liên quan và các cuộc thảo luận trên Stack Overflow để hiểu layout thanh tab sang modal được đề xuất. Ghi lại cách tiếp cận trong tài liệu chính thức của dự án, bao gồm một ví dụ hoàn chỉnh và mọi điểm cần lưu ý về API; công việc được xem là hoàn tất khi người dùng có thể làm theo ví dụ được ghi trong tài liệu để mở một modal từ thanh tab.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, react-native
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.