Skip to content

Fix RefreshControl initial prop replay#57478

Closed
adamivancza wants to merge 1 commit into
react:mainfrom
adamivancza:fix-refreshcontrol-initial-props
Closed

Fix RefreshControl initial prop replay#57478
adamivancza wants to merge 1 commit into
react:mainfrom
adamivancza:fix-refreshcontrol-initial-props

Conversation

@adamivancza

Copy link
Copy Markdown

Summary:

Fixes #56343.

Fixes an iOS Fabric RefreshControl regression where tintColor, title, and titleColor could be skipped during initial prop replay.

RCTPullToRefreshViewComponentView was comparing incoming props against its stored _props instead of the oldProps passed into updateProps. In replay/deferred update paths, _props can already match the incoming props even though the native UIRefreshControl has not received those values, so the native setters were skipped.

This updates the comparison to use oldProps when available, with a fallback to _props for null initial-mount calls.

Changelog:

[IOS] [FIXED] - Fix Fabric RefreshControl initial tintColor and title props not being applied on iOS

Test Plan:

Added RCTPullToRefreshViewComponentViewTests/testUpdatePropsUsesOldPropsWhenReapplyingStoredProps.

Verified the focused unit test passes:

xcodebuild test \
  -workspace packages/rn-tester/RNTesterPods.xcworkspace \
  -scheme RNTesterUnitTests \
  -sdk iphonesimulator \
  -destination "platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5" \
  -derivedDataPath /tmp/RNTesterUnitTestsBuild-RefreshControl \
  -resultBundlePath /tmp/RNTesterUnitTests-RefreshControl.xcresult \
  -only-testing:RNTesterUnitTests/RCTPullToRefreshViewComponentViewTests

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 8, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 8, 2026

@javache javache left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing with _props is the right behaviour (I know, the API is pretty confusing), as that's the last props the view was configured with, and the view may have been recycled since.

If native properties are not correctly updating, that's a view recycling bug.

@adamivancza

Copy link
Copy Markdown
Author

Comparing with _props is the right behaviour (I know, the API is pretty confusing), as that's the last props the view was configured with, and the view may have been recycled since.

If native properties are not correctly updating, that's a view recycling bug.

oh indeed, I totally missed that. thx for the clarification!

@adamivancza adamivancza closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fabric][iOS] RefreshControl tintColor/title props not applied on initial mount

2 participants