我们可以在admin- on -rest (React JS)中使用浏览器历史来代替hashhistory吗?我是否需要在admin-on-rest中更改某些内容,或者只是将服务器设置为处理URL?
发布于 2017-08-17 20:36:35
显然,现在只需从history包创建浏览器历史记录的实例并将其传递给<Admin />组件:
import createHistory from 'history/createBrowserHistory';
const history = createHistory();
const App = () => (
<Admin history={history}>
...
</Admin>
);发布于 2017-03-02 20:43:57
是的,您可以,但您需要编写一个自定义应用程序,而不是使用<Admin>组件。它被记录在the official documentation中。
https://stackoverflow.com/questions/42501932
复制相似问题