Reactjs – Authentication in react with react-router-v6 and zustand
AppRoutes: function AppRoutes(): JSX.Element { return ( <Routes> <Route path="/" element={<Auth />} /> <Route element={<RequiredAuth />}> <Route path="/home" element={<Home />} /> </Route> </Routes> ); } private routes checks import { Navigate, Outlet } from "react-router-dom"; import useAuth from "./hooks/useAuth"; const…