如何在 react-admin 中使用漂亮的 URLs (BrowserRouter)
How to use pretty URLs (BrowserRouter) with react-admin
有没有一种方法可以将 BrowserRouter 与 react-admin 一起使用来获得没有 #
字符的 URL?
您必须提供自己的历史记录。参见 https://marmelab.com/react-admin/Admin.html#history
import createHistory from 'history/createBrowserHistory';
const history = createHistory();
const App = () => (
<Admin history={history}>
...
</Admin>
);
有没有一种方法可以将 BrowserRouter 与 react-admin 一起使用来获得没有 #
字符的 URL?
您必须提供自己的历史记录。参见 https://marmelab.com/react-admin/Admin.html#history
import createHistory from 'history/createBrowserHistory';
const history = createHistory();
const App = () => (
<Admin history={history}>
...
</Admin>
);