Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Does not work within a ScrollView, bad performance when rendering multiple list components with real time data

未关闭
#995 2 条评论 10 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
react-native

调研方向

从 issue 中使用 React Native 0.79.1 和 react-native-pager-view 6.7.1 的可复现 MyPager 示例开始。调查 ScrollView 内的 PagerView 以及多个列表实时更新的场景;完成标准是,手势从 pager 上开始时,父级 ScrollView 可以滚动,并且渲染性能得到改善。

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

描述

Environment

react-native @ 0.79.1
react-native-pager-view @ 6.7.1

Description

Since @MrRefactor requested a new issue to be created (https://github.com/callstack/react-native-pager-view/issues/784), here it is. Compared to version 7.0.0.rc0, the current implementation performs much worse, especially in the case of a pager with multiple list components that have many rows and real-time data updates within. Also, the ScrollView bug persists, we are still not able to scroll a ScrollView when a Pager is rendered inside of it unless we perform the scroll gesture outside of the pager. I don't understand why support for the ScrollView based implementation was dropped as it performed perfectly well and IMO it should replace the current one. Honestly, based on the many threads and reports about this bug, I feel like this issue is being neglected.

Reproducible Demo

import React from 'react';
import { ScrollView, StyleSheet, View, Text } from 'react-native';
import PagerView from 'react-native-pager-view';

const MyPager = () => {
  return (
    <ScrollView>
      <PagerView style={styles.pagerView} initialPage={0}>
        <View key="1">
          <Text>First page</Text>
        </View>
        <View key="2">
          <Text>Second page</Text>
        </View>
      </PagerView>
    </ScrollView>
  );
};

const styles = StyleSheet.create({
  pagerView: {
    flex: 1,
  },
});

export default MyPager;
主要语言
TypeScript
星标
3.4k
派生
476
平均合并
4 天 8 小时
30 天内合并 PR
1

环境准备

从这里开始

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

callstack/react-native-pager-view 的其他 Issue

查看 callstack/react-native-pager-view 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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