2

can we use browser history in admin-on-rest (React JS) instead on hashhistory? do i need change something in admin-on-rest or just set the server to handle the URL ?

kazuyahiko
  • 343
  • 2
  • 13

2 Answers2

3

Apparently now it's only a matter of creating an instance of browser history from the history package and passing it to the <Admin /> component:

import createHistory from 'history/createBrowserHistory';

const history = createHistory();

const App = () => (
    <Admin history={history}>
        ...
    </Admin>
);

As per documentation

SuperLemon
  • 751
  • 1
  • 7
  • 23
1

Yes you can, but you need to write a custom app instead of using the <Admin> component. It's documented in the official documentation.

François Zaninotto
  • 7,068
  • 2
  • 35
  • 56