Uncaught Error: You should not use <Link> outside a <Router>
来源:13-5 PC端登录功能模块开发
ColaRex
2017-11-22
老师,在点完注册后console 会显示:Uncaught Error: You should not use <Link> outside a <Router>。注销掉link就没事了。
写回答
2回答
-
Parry
2017-11-22
第二十章新写法看了吗?
00 -
ColaRex
提问者
2017-11-22
其他相关的错误:
Failed context type: The context `router` is marked as required in `Link`, but its value is `undefined`.
Failed prop type: The prop `to` is marked as required in `Link`, but its value is `undefined`.
我导入的方法就是import {BrowserRouter, Route, Link} from 'react-router-dom';
022018-01-03
相似问题