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

In "Help" page witgh presentation set value to "transparentModal", I want push one new Page of name "Profile", How shuld i do?

オープン
#1,262 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
324
フォーク
2k
PR マージ指標
30日以内にマージされた PR はありません

説明

import * as React from 'react';
import { Button, View, Text } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

function Home({ navigation }) {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
Home Screen
<Button onPress={() => navigation.navigate('Help')} title="Go to Help" />
<Button
onPress={() => navigation.navigate('Profile')}
title="Go to Profile"
/>

);
}

function Help({ navigation }) {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
Help Screen
<Button onPress={() => navigation.push('Profile')} title="Go to Home2" />
<Button onPress={() => navigation.navigate('Invite')} title="Invite" />

);
}

function EmptyScreen() {
return ;
}

const Stack = createNativeStackNavigator();

function App() {
const isLoggedIn = true;

return (

<Stack.Navigator>
{isLoggedIn ? (
// Screens for logged in users
<Stack.Group>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Profile" component={EmptyScreen} />
</Stack.Group>
) : (
// Auth screens
<Stack.Group screenOptions={{ headerShown: false }}>
<Stack.Screen name="SignIn" component={EmptyScreen} />
<Stack.Screen name="SignUp" component={EmptyScreen} />
</Stack.Group>
)}
{/* Common modal screens */}
<Stack.Group screenOptions={{ presentation: 'transparentModal' }}>
<Stack.Screen name="Help" component={Help} />
<Stack.Screen name="Invite" component={EmptyScreen} />
</Stack.Group>
</Stack.Navigator>

);
}

export default App;

In "Help" page, I want push one new Page of name "Profile", How shuld i do?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供されている Stack.Navigator の例と、その Help、Profile、screen-group の宣言から始めます。このナビゲーションケースを説明すべきドキュメントページと、示すべき想定される設定または使用方法を特定します。完了条件は、ドキュメント化された例で Help から Profile に移動する方法が明確に説明されていることです。この issue では、更新対象のリポジトリファイルやテストは指定しません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react, react-native
領域
documentation, mobile
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。