react-native-focused-list
Focused scrollview with onReachEnd props for infinit scroll
Installation
$ yarn add react-native-focused-list
Example
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React Component from "react";import AppRegistry StyleSheet Dimensions Text View from "react-native"; import FocusedList from "react-native-focused-list"; { let focusText; let opacity; if thispropsisFocused focusText = <Text =>Focused!</Text>; opacity = opacity: 1 ; else focusText = <Text =>Not Focused!</Text>; opacity = opacity: 04 ; return <View = = > <View => <Text =>thispropsname</Text> focusText </View> </View> ; } { ; thisstate = loading: false data: page: 1 seed: 1 error: null refreshing: false ; } { this; } { const page seed = thisstate; const url = `https://randomuser.me/api/?seed=&page=&results=5`; this; ; }; { this; }; { this; }; { return <View => thisstatedatalength !== 0 && <FocusedList = = = = > thisstatedata </FocusedList> </View> ; } const dim = Dimensions;const styles = StyleSheet;