欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

react-router Cannot read property ‘location‘ of undefined

程序员文章站 2024-01-16 20:54:10
...
import {  Route,  Router } from 'react-router-dom'

改为

import {  Route, BrowserRouter as Router } from 'react-router-dom'
相关标签: 踩坑系列