aakash2310

Untitled

Dec 12th, 2022
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import React from 'react';
  2. import { FlatList } from 'react-native';
  3.  
  4. function MyList({ data }) {
  5. const renderItem = ({ item }) => {
  6. return <MyListItem item={item} />;
  7. };
  8.  
  9. const handleLoadMore = () => {
  10. // Add logic to load more items here
  11. };
  12.  
  13. return (
  14. <FlatList
  15. data={data}
  16. renderItem={renderItem}
  17. onEndReached={handleLoadMore}
  18. />
  19. );
  20. }
  21.  
Add Comment
Please, Sign In to add comment