skip to Main Content

Reactjs – Redirecting in latest react-router-dom

import "./app.css"; import Sidebar from "./components/sidebar/Sidebar"; import Topbar from "./components/topbar/Topbar"; import Home from "./pages/home/Home"; import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import UserList from "./pages/userList/UserList"; import User from "./pages/user/User"; import NewUser from "./pages/newUser/NewUser"; import ProductList from "./pages/productList/ProductList";…

VIEW QUESTION

Reactjs – React router error: Unsafe assignment of an `any` value

This code supposedly works on my previous projects. I wonder why typescript returns this kind of error: Unsafe assignment of an anyvalue.eslint@typescript-eslint/no-unsafe-assignment Unsafe call of ananytyped value.eslint@typescript-eslint/no-unsafe-call (alias) createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts | undefined): Router import createBrowserRouter react-router-dom version 6.14.1…

VIEW QUESTION
Back To Top
Search