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

113
Views
How to update redux state without creating new array
export const initialState = {
   data: [1,2,3]
}

after success api request i am updating data state

 data: state.data.concat(...action.data.data) 

All the flat list items are getting re-render as concat is returning new array.(onReachEnd i am calling api for next page. and that data needs to added in redux state without updating whole array )

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

You can just destructure both

data : [...state.data, ...action.data.data]
about 4 years ago · Santiago Gelvez Report
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!