skip to Main Content

Javascript – Uncaught Error: Could not find a matching route when redirecting to /login page after logout

I'm trying to implement JWT in my project and an article provides a nice solution: https://dev.to/sanjayttg/jwt-authentication-in-react-with-react-router-1d03. Routes.jsx import { RouterProvider, createBrowserRouter } from "react-router-dom"; import { useAuth } from "../provider/authProvider"; import { ProtectedRoute } from "./ProtectedRoute"; import Login from "../pages/Login";…

VIEW QUESTION

Reactjs – Navigate from app.js, that is outside of the BrowserRouter wrapping

app.js import React from "react"; import { createRoot } from "react-dom/client"; import { Provider } from "react-redux"; import configureStore from "./store/configureStore"; import { startSetExpenses } from "./actions/expenses"; import 'normalize.css/normalize.css'; import './styles/styles.scss'; import AppRouter from "./routers/AppRouter"; import 'react-dates/lib/css/_datepicker.css'; import { auth…

VIEW QUESTION
Back To Top
Search