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

212
Views
How do I go back one page and refresh it using useNavigate?

I want to go back one page and refresh it because I need a list to be updated and it doesn't do it when I'm just using the navigate(-1)

Code for example:

import { useNavigate } from 'react-router-dom';
    
function YourApp() {
  const navigate = useNavigate();

  return (
    <>
      <button onClick={() => navigate(-1)}>go back</button>
    </>
  );
}
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I was able to solve this partly. To be able to refresh the list I wanted I used Redux and its useSelector() function. The refresh page part is not possible yet because its not implemented into the navigator.

Btw: The functionality I was after is the equivalent of doing window.location.reload().

about 4 years ago · Juan Pablo Isaza Report

0

If you're using react-router v6

import { useNavigate } from "react-router-dom";

const navigate = useNavigate();

const refreshPage = () => {
    navigate(0);
}
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!