Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-infinite-scroll-view

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-infinite-scroll-view - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

26

InfiniteScrollView.js

@@ -41,3 +41,3 @@ 'use strict';

this._onLoadMoreAsync = this._onLoadMoreAsync.bind(this);
this._loadMoreAsync = this._loadMoreAsync.bind(this);
}

@@ -59,7 +59,7 @@

this.props.renderLoadingErrorIndicator(
{ onRetryLoadMore: this._onLoadMoreAsync }
{ onRetryLoadMore: this._loadMoreAsync }
),
{ key: 'loading-error-indicator' },
);
} else if (this.props.canLoadMore) {
} else if (this.state.isLoading) {
statusIndicator = React.cloneElement(

@@ -90,9 +90,4 @@ this.props.renderLoadingIndicator(),

if (this.state.isLoading || !this.props.canLoadMore ||
this.state.isDisplayingError) {
return;
}
if (this._distanceFromEnd(event) < this.props.distanceToLoadMore) {
this._onLoadMoreAsync().catch(error => {
if (this._shouldLoadMore(event)) {
this._loadMoreAsync().catch(error => {
console.error('Unexpected error while loading more content:', error);

@@ -103,5 +98,12 @@ });

async _onLoadMoreAsync() {
_shouldLoadMore(event) {
return !this.state.isLoading &&
!this.props.canLoadMore &&
!this.state.isDisplayingError &&
this._distanceFromEnd(event) < this.props.distanceToLoadMore;
}
async _loadMoreAsync() {
if (this.state.isLoading && __DEV__) {
throw new Error('_onLoadMoreAsync called while isLoading is true');
throw new Error('_loadMoreAsync called while isLoading is true');
}

@@ -108,0 +110,0 @@

{
"name": "react-native-infinite-scroll-view",
"version": "0.3.1",
"version": "0.3.2",
"description": "An infinitely scrolling view that notifies you as the scroll offset approaches the bottom",

@@ -5,0 +5,0 @@ "main": "InfiniteScrollView.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc