Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Complete Example showing all available events and properties ? #21

Open
shidhincr opened this issue Apr 14, 2016 · 15 comments
Open

Complete Example showing all available events and properties ? #21

shidhincr opened this issue Apr 14, 2016 · 15 comments

Comments

@shidhincr
Copy link

Sorry to ask this again ( I saw a couple of closed tickets ), But it's kind of hard to implement the infinite scrollView.

Can someone provide a complete working example of how to use canLoadMore , isLoadingMore and onLoadMoreAsync for the infinite scrolling ?

Including a screenshot would be super helpful.

PS: I am facing another problem with the listView. I was using the contentContainerStyle to show the grid style inside the listView ( as explained here). With this set-up, I am not sure how to implement the infinite scrolling. Can someone lead me to the right direction ?

This is how the listView now:

<ScrollView>
          <ListView
            dataSource={items}
            contentContainerStyle={styles.gridContainer}
            renderRow={(details) => Product(details, this.onPressAction) }
            onEndReachedThreshold={40}
            onEndReached={this.onEndReached}
          />
</ScrollView>
@kenchengch
Copy link

I need an example too!

@laurentnguyen
Copy link

+1

@RonakKhandelwal
Copy link

+1 onLoadMoreAsync method failed prototype error

@ide ide added the wants help label Jun 2, 2016
@antonsivogrivov
Copy link

+1. It's too hard with out example :(

@Aathi
Copy link

Aathi commented Jun 22, 2016

+1

2 similar comments
@yaoyonstudio
Copy link

+1

@luco
Copy link

luco commented Jul 28, 2016

+1

@davedega
Copy link

davedega commented Aug 5, 2016

+1 jaja

@waleedarshad-vf
Copy link

+1

3 similar comments
@gventuri
Copy link

+1

@Jaafar-abusair
Copy link

+1

@RatFou
Copy link

RatFou commented Oct 6, 2016

+1

@pyankoff
Copy link

pyankoff commented Oct 8, 2016

Managed to make it work with redux with the following code:

async _loadMore(dispatch) {
    dispatch(Actions.getData())
  }

render() {
  return (
    <ListView
      renderScrollComponent={props => <InfiniteScrollView {...props} />}
      dataSource={...}
      renderRow={...}
      canLoadMore={this.state.canLoadMoreContent}
      onLoadMoreAsync={() => this._loadMore(this.props.dispatch)}
    />
  );
}

Found rnplay project to be a great example of setting up redux and HTTP API requests:

@carlosgarbiatti
Copy link

Thanks @pyankoff! I spent couple hours trying to get this going... was only able to do so thanks to your example... Cheers!

wli added a commit to wli/react-native-infinite-scroll-view that referenced this issue Nov 23, 2016
wli added a commit to wli/react-native-infinite-scroll-view that referenced this issue Nov 24, 2016
wli added a commit to wli/react-native-infinite-scroll-view that referenced this issue Nov 29, 2016
ide pushed a commit that referenced this issue Nov 30, 2016
Fixes #28
Fixes #7
Fixes #1
Addresses #21
@iesteban
Copy link

iesteban commented May 9, 2017

Hi all, you can find a working example right here:
https://github.com/Semillas/SemillasReactNative/blob/master/App/Containers/Feed.js#L100

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests