mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 06:08:24 +00:00
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: https://github.com/facebook/react-native/pull/22376 Differential Revision: D13310372 Pulled By: TheSavior fbshipit-source-id: 445f28cf2c37f9c937e72d76716002deaf9d9c94
This commit is contained in:
parent
2330843fa7
commit
ff6a53de2a
@ -87,7 +87,7 @@ export type RefreshControlProps = $ReadOnly<{|
|
||||
/**
|
||||
* Called when the view starts refreshing.
|
||||
*/
|
||||
onRefresh?: ?() => void,
|
||||
onRefresh?: ?() => mixed,
|
||||
|
||||
/**
|
||||
* Whether the view should be indicating an active refresh.
|
||||
|
Loading…
x
Reference in New Issue
Block a user