Skip to content

chore: Convert RefreshControl to function component - #57187

Open
retyui wants to merge 1 commit into
react:mainfrom
retyui:RefreshControl-fn-comp
Open

chore: Convert RefreshControl to function component#57187
retyui wants to merge 1 commit into
react:mainfrom
retyui:RefreshControl-fn-comp

Conversation

@retyui

@retyui retyui commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary:

As per title.

Changelog:

[GENERAL] [CHANGED] - Convert RefreshControl to function component

Test Plan:

  1. Create a RN simple app
  2. Use this example: https://reactnative.dev/docs/refreshcontrol#example
  3. Replace source code of node_modules/react-native/Libraries/Components/RefreshControl/RefreshControl.js with code from this PR
  4. Test it

@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 Jun 12, 2026
@facebook-github-tools facebook-github-tools Bot added p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jun 12, 2026
@retyui
retyui force-pushed the RefreshControl-fn-comp branch from 38bcf99 to ca92dc0 Compare September 10, 2026 12:15
@github-actions

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

};
}

export type RefreshControlInstance = RefreshControl;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

RefreshControlInstance is not a class instance anymore!

ref is forwarded down to native components (PullToRefreshViewNativeComponent or AndroidSwipeRefreshLayoutNativeComponent)

@retyui
retyui force-pushed the RefreshControl-fn-comp branch from ca92dc0 to 81ead7c Compare September 10, 2026 12:23
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. p: Callstack Partner: Callstack Partner 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.

1 participant