make an infinite list in react native

Solutions on MaxInterview for make an infinite list in react native by the best coders in the world

showing results for - "make an infinite list in react native"
Ana
03 Jan 2018
1export default function App() {
2  const [enteredGoal,setEnteredGoal] = useState('');
3  const [courseGoals, setCourseGoals] = useState([]);
4  const goalInputHandler = (enteredText) => {
5    setEnteredGoal(enteredText);
6  }
7  const addGoalHandler = () => {
8    setCourseGoals(currentGoals => 
9      [...currentGoals,{key:Math.random().toString(),value:enteredGoal}]
10    )
11  }
12
13  return (
14    <View style={styles.screen}>
15      <View>
16        <View style={styles.otherview}>
17          <TextInput 
18          placeholder='A goal' 
19          style={styles.textinput} 
20          onChangeText={goalInputHandler} 
21          value={enteredGoal}/>
22          <Button title='Add' onPress={addGoalHandler}/>
23        </View>
24      </View>
25      
26      <FlatList 
27        data={courseGoals}
28        renderItem={itemData => (
29          <View style={styles.listItem}>
30            <Text>{itemData.item.value}</Text>
31          </View>
32        )}
33      />
34        
35          
36      
37    </View>
38  );
39}
queries leading to this page
react native inifinite scrollhow to load data on scroll time in react nativereact native infinite scrollreact infinite listinfinite scroll react nativeinfinite scroll flatlist react nativeinfinite horizontal carousel in react nativeflatlist infinite scroll more datareact native infinite scroll flatlistsrolling infinite react nativeflatlist infinite scrollsectionlist infinity scrollmake an infinite list in react nativereact native inifinte scrollflatlist infinite scroll react nativereact native flatlist infinite scrollinfinite scroll with react native flatlistfetch as you scroll react nativeinfinite scroll flatlisthow to make a scroll list in react nativeanimated scrollview infinite scroll react nativehow to implement infinite scroll in react native flatlistreact native infiniti listflatlist vertical scroll paginationhow to make an infinite scroll on react nativeflatlist infinite scroll react nativereact native onscroll api callunlimeted scroll react native examplereact native infinite listinfinite list react nativ not workingreact native on scroll get data flatlistinfinite scroll render footer indicator react nativereact native infite chartauto loading on scroll using flatlistmake a flip card in react nativeinfinite scroll with map in react nativehow on scroll we can call api in react nativereact native infinite modelinfinite flatlist react native on onimplement infinite scroll flatlistonscroll how to implement pagination in react nativereactnative infinite scroll without flatlistinfinite scroll react native flatlistinfinite scrollview react nativeinfinte scroll flatlist loaderindinite loading react nativereact native flatlist infinite scrollinfinite scroll in react nativehow to impelment api on scroll in react nativemake an infinite list in react native