Skip to content

Commit ff6a53d

Browse files
janicduplessisfacebook-github-bot
authored andcommittedDec 3, 2018
Make type of RefreshControl.onRefresh less strict (#22376)
Summary: I think a common pattern is to use async functions with the onRefresh prop to reload data. I made the type `mixed` since we don't care about what the function returns. Could also be `void | Promise<void>` I haven't really seen a pattern for those in the codebase. Pull Request resolved: #22376 Differential Revision: D13310372 Pulled By: TheSavior fbshipit-source-id: 445f28cf2c37f9c937e72d76716002deaf9d9c94
1 parent 2330843 commit ff6a53d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎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?: ?() => void,
90+
onRefresh?: ?() => mixed,
9191

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

0 commit comments

Comments
 (0)