From 56f6ff1532bb8d0a7b4f145d2d89ba064d95e572 Mon Sep 17 00:00:00 2001 From: fdhhhdjd Date: Sat, 23 Sep 2023 13:54:02 +0700 Subject: [PATCH] #31 [ Router ] React Router --- src/routers/8.useNavigate Hook/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routers/8.useNavigate Hook/index.js b/src/routers/8.useNavigate Hook/index.js index 09b9035..ff8b3c2 100644 --- a/src/routers/8.useNavigate Hook/index.js +++ b/src/routers/8.useNavigate Hook/index.js @@ -4,7 +4,10 @@ import { useNavigate } from 'react-router-dom'; const NavigateLearn8 = () => { const navigate = useNavigate(); setTimeout(() => { - navigate('/'); + // Step 1 + // navigate('/'); + // Step 2 + navigate(-1); }, 3000); return ( <>