callstack / callstack/react-native-pager-view

Page cannot be navigated to after being dynamically added

オープン
#949 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
3.4k
フォーク
476
平均マージ
10日 21時間
マージ済み PR(30日)
2

説明

## Environment

- react-native-pager-view: 6.5.1
- react: 18.3.1
- react-native: 0.76.5
- expo: 52.0.18

## Description

A page cannot be navigated to after being dynamically added. See also the reproduction repository's README.

## Reproducible Demo

### Setup

1. Clone repository: https://github.com/winghouchan/react-native-pager-view-dynamic-page-mcve.
2. Install dependencies (`yarn`).
3. Build the app (`npx expo prebuild` && `yarn ios`).

### Reproduction

1. After opening the app, press "Add new page and navigate to it".

A new page should be added and navigated to. Instead, the new page is added (seen in the component tree in dev tools) but not navigated to.

## Additional notes

Doing either of the following seems to work around the issue:

- Wrapping `setPage` in `setTimeout(..., 0)`
- Disabling React Native's new architecture (see `working-example` branch, a rebuild is required before running).

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

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

調査の方向性

リンクされた再現用リポジトリとその README から始め、記載されているセットアップと「Add new page and navigate to it」アクションを使用します。通常の動作を working-example ブランチおよび new-architecture 設定と比較します。報告されたバージョンで、どちらの workaround も使わずに動的に追加されたページへナビゲートできれば完了です。

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

評価

技術スタック
react-native, typescript
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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