react-native-pull-to-refresh
react-native-pull-to-refresh copied to clipboard
use onScroll function passed in component props for iOS
Hi, I detected that onScroll function passed in props to PTRView component wasn't called only on iOS. An issue related to this problem has already been opened : https://github.com/moschan/react-native-pull-to-refresh/issues/28 This pull request fix the issue by adding the missing call.
I think it would be better to check if not null first right? Or will that be handled elsewhere?
const { onScroll } = this.props;
if(onScroll) onScroll(e);
yes a condition is required you're right