react / react/react-native

regression: VirtualizedList scrolls infinitely on new item

Abierto
#38,907 0 comentarios 13 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Component: VirtualizedList Impact: Regression Issue: Author Provided Repro
Lenguaje dominante
C++
Estrellas
127k
Forks
25.3k
Merge medio
1 d 23 h
PR fusionados (30 d)
4

Descripción

Description

FlatList is behaving unexpectedly on React Native 0.71 for lists with dynamic height items.
I was able to create a repro pointing to React Native versions:

  • 0.69.8
  • 0.70.13
  • 0.71.12
  • 0.72.3

The issue starts to happen on 0.71, but it still happens on 0.72.
Bug happens both on Android and iOS.
I was not able to find the commit that introduced this bug.

React Native Version

0.72.3

Output of npx react-native info

System:
OS: macOS 13.0.1
CPU: (8) arm64 Apple M1 Pro
Memory: 88.42 MB / 16.00 GB
Shell:
version: 5.8.1
path: /bin/zsh
Binaries:
Node:
version: 18.15.0
path: ~/.nvm/versions/node/v18.15.0/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 9.5.0
path: ~/.nvm/versions/node/v18.15.0/bin/npm
Watchman:
version: 2023.07.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/diegomello/.rvm/gems/ruby-2.7.7/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.1
- iOS 16.1
- macOS 13.0
- tvOS 16.1
- watchOS 9.1
Android SDK:
API Levels:
- "23"
- "28"
- "30"
- "31"
- "33"
Build Tools:
- 23.0.1
- 23.0.2
- 25.0.0
- 25.0.1
- 25.0.2
- 25.0.3
- 26.0.1
- 26.0.2
- 26.0.3
- 27.0.1
- 27.0.3
- 28.0.3
- 29.0.0
- 29.0.1
- 29.0.2
- 29.0.3
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
System Images:
- android-27 | Google APIs ARM 64 v8a
- android-27 | Google Play Intel x86 Atom
- android-30 | Google Play ARM 64 v8a
- android-30 | Google Play Intel x86 Atom
- android-31 | ARM 64 v8a
- android-31 | Google APIs Intel x86 Atom_64
- android-31 | Google Play ARM 64 v8a
Android NDK: 23.0.7344513-beta4
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9862592
Xcode:
version: 14.1/14B47b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.18
path: /usr/bin/javac
Ruby:
version: 2.7.7
path: /Users/diegomello/.rvm/rubies/ruby-2.7.7/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.3
wanted: 0.72.3
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: false
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Steps to reproduce

See the video. The repro is very straightforward and it simulates a FlatList with dynamic height items.
It's all about scrolling until the list struggles to render the elements. (It's still stuck scrolling as I type the report)
I found it easier to scroll to around 800~1000 and tap Add item top, but it can be reproduced by just scrolling.

https://github.com/facebook/react-native/assets/804994/05787d61-dccf-4e36-8ee9-94a0c84236bd

(I trimmed the video to fit Github, but it was basically scrolling until it reached 1000 rows)

Snack, screenshot, or link to a repository

https://github.com/diegolmello/ReproListScroll

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el repositorio ReproListScroll enlazado y reproduce el comportamiento descrito en el vídeo, comparando React Native 0.70.13 con 0.71 y 0.72. Se considera terminado cuando una FlatList con elementos de altura dinámica ya no se desplaza indefinidamente ni se queda atascada después de añadir un elemento cerca del principio.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
react-native
Área
mobile
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.