jsdf / react-native-refreshable-listview

Deprecated. A pull-to-refresh ListView which shows a loading spinner while your data reloads
1.38k stars 168 forks source link

It can be automatically refresh? #4

Closed developerworks closed 9 years ago

developerworks commented 9 years ago

When some events happened, if there have a method to trigger a refreshing automatically ?

jsdf commented 9 years ago

That's an interesting idea, I'm not sure what would be the most useful way to implement it. One possibility would be to call a method on the component via a ref, though that's only useful if it's parent is the one doing the refreshing. Another option might be to provide a Higher-Order Component which you can incorporate into your own component and interact with the 'refreshing' state manually. Or maybe just allow you to pass in a 'refreshing' prop which would supercede the internal 'refreshing' state.

jsdf commented 9 years ago

This requirement is now covered by the ControlledRefreshableListView component.