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

158
Views
How to stop React to rerender when I switch to other url from project

I build a project in React using Redux and Router and I have a little question. If I navigate between project pages by clicking buttons, my state from Redux is not deleted.

But if I try to write the url instead of clicking the button to go to the same page, my state is deleted.

How can I resolve this problem?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your redux store gets deleted because you have refreshed the page and no data related to the main page is present in the redux now , If you want to retain data inside redux even when you type url in browser without clicking any button , just use localstorage along with redux , and apply a check if your localstorage is present then store all the data inside redux else store data from redux to local storage .

I hope this solves your issue .

about 4 years ago · Juan Pablo Isaza 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!