Page not changing onClick using useNavigate in React?

Advertisements I have a very basic UI for a login page: Upon clicking the LOGIN button, the following methods gets called: async function loginPatient(){ let item ={username:userName, password}; let result = await fetch("http://localhost:8000/users/login",{ method:’POST’, headers:{ "Content-Type":"application/json", "Accept":"application/json" }, body: JSON.stringify(item) }); alert(result); alert("breakpoint") result = await result.json(); localStorage.setItem("user-info",JSON.stringify(result)); nav(‘/patient’) } At this point I simply… Read More Page not changing onClick using useNavigate in React?