Skip to content

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

Open
@nicolinho22

Description

@nicolinho22

Environment

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

Description

Since @MrRefactor requested a new issue to be created (#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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions