TabView (react-native-pager-view) does not update inside RNN screen on iOS (index updates but UI does not change)

未关闭
#8,271 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
ios, react-native
领域
mobile

调研方向

在一个使用 react-native-tab-view 和 react-native-pager-view 的干净 React Native 0.77.3 iOS 项目中复现该问题,先单独复现,然后在 react-native-navigation 屏幕内复现。比较启用 New Architecture 时 TabView 的行为,并使用报告中的软件包版本作为基线。完成标准是 onIndexChange 能够可靠地更新可见标签页,且不会跳回去。

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

描述

platform: iOS type: accepted/bug
What happened?

When using react-native-tab-view (which relies on react-native-pager-view) inside a react-native-navigation (RNN) screen on iOS, tab switching does not work correctly.

The index state updates correctly (onIndexChange fires), but the visible tab does not change or snaps back to the previous tab.

https://github.com/user-attachments/assets/93bbb959-11be-46c1-918d-c3f61da0f1f5

What was the expected behaviour?

Tabs should switch correctly when index changes.

Was it tested on latest react-native-navigation?
  • I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!

Create a clean React Native 0.77 project
Add react-native-tab-view and react-native-pager-view
TabView works correctly
Add react-native-navigation
Render the same TabView inside an RNN screen
Try switching tabs

In what environment did this happen?

react-native: 0.77.3
react-native-navigation: 8.7.4 and latest
react-native-tab-view: 4.0.5
react-native-pager-view: 6.9.1
Platform: iOS
New Architecture: enabled

主要语言
MDX
星标
13.2k
派生
2.6k
平均合并
2 天 10 小时
30 天内合并 PR
6

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

wix/react-native-navigation 的其他 Issue

查看 wix/react-native-navigation 的全部 Issue

相似的 Issue

更多 Mobile Dev Issue

把新 issue 发到你的邮箱

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