Created
May 25, 2018 21:09
-
-
Save hgale/e92e8fff418c92f486bb68ef93e7c6c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_defaultRenderScrollComponent = props => { | |
// if (this._isNestedWithSameOrientation()) { | |
// return <View {...props} />; | |
// } else | |
if (props.onRefresh) { | |
invariant( | |
typeof props.refreshing === 'boolean', | |
'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' + | |
JSON.stringify(props.refreshing) + | |
'`', | |
); | |
return ( | |
<ScrollView | |
{...props} | |
refreshControl={ | |
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This | |
* comment suppresses an error when upgrading Flow's support for | |
* React. To see the error delete this comment and run Flow. */ | |
<RefreshControl | |
refreshing={props.refreshing} | |
onRefresh={props.onRefresh} | |
progressViewOffset={props.progressViewOffset} | |
/> | |
} | |
/> | |
); | |
} else { | |
return <ScrollView {...props} />; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment