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

Open a modal from a tab bar

未关闭
#27 15 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

help wanted
主要语言
JavaScript
星标
324
派生
2k
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

查看链接的 Expo Snack 解决方案以及相关 issue 和 Stack Overflow 讨论,以了解所提议的从标签栏到模态框的布局。在项目的官方文档中记录该方案,包括一个完整示例和任何 API 注意事项;当用户可以按照文档中的示例从标签栏打开模态框时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react-native
领域
documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。