react / react/react-native

FlatList: Pull to Refresh refresh controls are "freezed" after navigation.goBack()

Aperta
#41,515 10 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Component: FlatList Issue: Author Provided Repro Needs: Repro Needs: Triage :mag:
Lingua principale
C++
Stelle
127k
Fork
25.3k
Merge medio
1g 23h
PR unite (30g)
4

Descrizione

Description

I cannot find any open issue for this topic.

I have 2 screens inside same context, useEffect depend on both screens depend on the same state from common context.

When I update context state data on Screen 2, and goBack()to Screen 1, refresh controls for flatlist are just freezed and I need to pull it to make it disappear:

State with refreshingvalue if changing to false correctly.

React Native Version

0.73.0-rc.4

Output of npx react-native info

System:
OS: macOS 14.1.1
CPU: (12) arm64 Apple M3 Pro
Memory: 68.31 MB / 18.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 21.1.0
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.0
path: /opt/homebrew/bin/npm
Watchman:
version: 2023.11.06.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.11005911
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.9
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.0-rc.4
wanted: 0.73.0-rc.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Steps to reproduce
  1. Make 2 screens inside same context
  2. Use FlatList on screen 1 and screen 2
  3. Use useEffect dependent on the same state in the common context
  4. go to Screen 2 , modify state in the common context
  5. use navigation.goBack()
  6. See that refresh controls are still there even if refreshingis false
Snack, screenshot, or link to a repository
Screenshot by Dropbox Capture

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Non viene fornito alcun file sorgente, test o repository di riproduzione. Inizia riproducendo i sei passaggi elencati con due schermate FlatList, stato di context condiviso, dipendenze di useEffect e navigation.goBack(); il lavoro è completato quando il controllo di aggiornamento scompare quando refreshing diventa false dopo il ritorno a Screen 1.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react-native
Ambito
mobile
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.