Skip to content

Commit 84c5416

Browse files
excedfacebook-github-bot
authored andcommitted
Flow type RefreshControl (#22119)
Summary: Related to #22100 Enhance Flow types for RefreshControl specifying `onRefresh` props type. There are still 2 `any` left using `requireNativeComponent` that need to be addressed to turn Flow to strict mode. I went through `RCTRefreshControl` and `AndroidSwipeRefreshLayout` classes to understand where this method came from. - All flow tests succeed. [GENERAL] [ENHANCEMENT] [RefreshControl.js] - Flow onRefresh type Pull Request resolved: #22119 Differential Revision: D12919764 Pulled By: TheSavior fbshipit-source-id: 9ba675be8dbce77d77972acb904fc13c68524831
1 parent 0ea95e7 commit 84c5416

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Components/RefreshControl/RefreshControl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export type RefreshControlProps = $ReadOnly<{|
8787
/**
8888
* Called when the view starts refreshing.
8989
*/
90-
onRefresh?: ?Function,
90+
onRefresh?: ?() => void,
9191

9292
/**
9393
* Whether the view should be indicating an active refresh.

0 commit comments

Comments
 (0)