react-navigation / react-navigation/react-navigation.github.io
Document how to render conditional child navigation
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 324
- 分支
- 2k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Hi. In my team we’ve struggled to implement conditional child navigation, where a branch of the navigation depends on user data (e.g. data in Redux and/or received from an API). In pseudo-code:
const Section1Default = StackNavigator(/* Some screens */)
const Section1Onboarding = StackNavigator(/* Different screens */)
const RootNavigator = TabNavigator({
section1: Section1Default OR Section1Onboarding,
section2: …,
section3: …
})
The idea is that when clicking on a specific tab, the user should see either a series of "onboarding" screens or the feature’s screens. (Both options are navigators themselves, but could be single screens too.)
@brentvatne & @ericvicenti Do you think that’s a use case worth addressing in the docs?
I think I could contribute a page section or a page on this, but I’m not sure what solution to offer.
So far we’ve only found hackish workarounds, such as: a wrapper component which has a StackRouter with the two navigation branches, and which navigates to the correct branch on willFocus. It works, but the trick falls short when using the Android back button.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
未指定文件、測試或進入點。首先檢視現有的導覽文件和回報的 wrapper 元件替代方案,然後驗證條件式子導覽器如何與 Android 返回按鈕互動。完成的標準是記錄一種經同意且受支援的模式,用於根據使用者資料選擇 onboarding 或功能導覽。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react-native
- 領域
- documentation, mobile-dev
- Issue 類型
- 文件
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100