Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
How to implement a 'load more' functionality in react native with redux saga?

How to Add loadmore in react native flatlist

get result from redux

SearchScreen

const listing= useSelector((state) => state.adData.data);

<FlatList
          showsVerticalScrollIndicator={false}         
          data={listings}
          keyExtractor={keyExtractor}
          removeClippedSubviews={true}
          onEndReached={loadMore}
          onEndReachedThreshold={0.8}
          windowSize={15}
          getItemLayout={getItemLayout}
          renderItem={renderItem}
        />


const loadMore = async () => {
    setpageCurrent((page) => page + 1);
  };

I'm try data concat return { ...state, data: [...state.concat(payload)], 'loading': false };

Not working correctly

Reducer

export default function productReducer(
  state = initState,
  { type, payload, error }
) {
  switch (type) {
    // Get list products
    case Actions.GET_ADS:
      return { ...state, loading: true };
    case Actions.GET_ADS_SUCCESS:
    return {...state, data : payload,'loading': false};
 default:
      return state;
  }

Saga

function* fetchListingsSaga({ page }) {
  try {
    const data = yield call(getListings, { page });
    yield put({ type: Actions.GET_ADS_SUCCESS, payload: data.data.response });
  } catch (e) {
    yield put({ type: Actions.GET_PRODUCT_ATTRIBUTE_ERROR, error: e });
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!