Skip to content

Instantly share code, notes, and snippets.

View SolankiYogesh's full-sized avatar
🏢
Working at Bitnet Infotech

Yogesh Solanki SolankiYogesh

🏢
Working at Bitnet Infotech
View GitHub Profile
@SolankiYogesh
SolankiYogesh / ReactNativeInfiniteList.tsx
Created January 29, 2025 05:33
React Native Infinite List (Paginated List)
import React, { useState, useRef, useCallback, useMemo } from 'react';
import { FlatList, ActivityIndicator } from 'react-native';
export default () => {
const pageCount = useRef(1);
const [list, setList] = useState([]);
const isLoadMore = useRef(true);
const [loadMore, setLoadMore] = useState(false);
const [isLoading, setIsLoading] = useState(false);