首页 > 解决方案 > 如何防止 goBack() 上的 react-router 刷新?

问题描述

我将BrowserRouterfromreact-router用于我的应用导航,但在后面是问题所在。我应该使用StaticRouter吗?

我的代码:

import { BrowserRouter as Router, Route } from "react-router-dom";
...
<Router history={history}  forceRefresh={false}>
    ...

标签: reactjsreact-routerhistorybrowser-history

解决方案


推荐阅读