react / react/react-native

RefreshControl Issues - `tintColor` prop not respected & gets stuck on navigation

オープン
#53,987 コメント 29 件 リアクション 25 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Component: RefreshControl Needs: Triage :mag: Type: New Architecture
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

There are two bugs I'm reporting with the same component, and providing a good repro for each within the same repository.
This issue is the single main problem I am having throughout my app with the new architecture. I use this RefreshControl component everywhere and it is not behaving right anywhere.

Configuration:

  • New Arch
  • RN 0.81.4
  • Expo 54.0.10
  • React 19.1.0
  • iOS

Bug 1 - tintColor property is not respected:

Code:

          <RefreshControl
            refreshing={refreshing}
            onRefresh={manualRefresh}
            tintColor="orange" // Should be orange but isn't respected
          />

Video Displaying Issue:

https://github.com/user-attachments/assets/bb7add88-634d-44c0-b7a4-52b2821a885f

There is a hack around this issue by applying the tintColor after a small delay:

  const [tintColor, setTintColor] = useState<ColorValue>("white")
  useEffect(() => {
    setTimeout(() => setTintColor("orange"), 500)
  }, [])

Bug 2 - Refresh Control gets stuck on navigation:

Changing tabs while a pull-to-refresh is active makes the RefreshControl get stuck.

The only hack around this that I have found is force-resetting the refreshing prop after the screen is unfocused.

const isFocused = useIsFocused()

useEffect(() => {
    if (!isFocused) {
        setRefreshing(false)
    }
},[isFocused])

Video Displaying Issue:

https://github.com/user-attachments/assets/43406fa5-7d1e-41b0-b2c3-005490ccce33

Note I have found several past issues that are somewhat related:

https://github.com/facebook/react-native/issues/46631 (Closed, but probably shouldn't be)
https://github.com/facebook/react-native/issues/51914
https://github.com/facebook/react-native/issues/35779

Steps to reproduce

Download the repro found here:
https://github.com/ChristopherGabba/RNV7_TestApp

Run:

  1. yarn install
  2. npx expo prebuild --clean
  3. npx expo run:ios --device
React Native Version

0.81.4

Affected Platforms

Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: macOS 15.6.1
  CPU: (10) arm64 Apple M2 Pro
  Memory: 131.34 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.4.0
    path: ~/.nvm/versions/node/v23.4.0/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.5.2
    path: ~/.nvm/versions/node/v23.4.0/bin/npm
  Watchman:
    version: 2025.04.14.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/christophergabba/.gem/ruby/3.4.3/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.0
      - iOS 26.0
      - macOS 26.0
      - tvOS 26.0
      - visionOS 26.0
      - watchOS 26.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.26094.121.2513.14007798
  Xcode:
    version: 26.0.1/17A400
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 3.4.3
    path: /Users/christophergabba/.rubies/ruby-3.4.3/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.81.4
    wanted: 0.81.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
Stacktrace or Logs
N/A
MANDATORY Reproducer

https://github.com/ChristopherGabba/RNV7_TestApp

Screenshots and Videos

Provided above.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされている RNV7_TestApp の再現アプリから始め、yarn install、npx expo prebuild --clean、npx expo run:ios --device を実行します。報告された 2 つの挙動について、iOS Fabric RefreshControl のエントリポイントを調査します。設定されている場合、tintColor はオレンジになる必要があり、ナビゲーション後にコントロールが固まったままになってはいけません。完了とは、両方の挙動が修正され、再現アプリで検証されていることを意味します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
ios, react-native, typescript
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。