Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react router go back

// Step 1:
import { useNavigate } from "react-router-dom";
// Step 2:
const navigate = useNavigate();
// step 3:
<button onClick={() => navigate(-1)}> Back </button>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #router
ADD COMMENT
Topic
Name
9+2 =