I am creating a project using reactjs.In my project i want to remove # from the url. Currently i am using the react-router version 4. here is my code
import { HashRouter as Router, Route,browserHistory } from 'react-router-dom';
<Router history={browserHistory} >
<App>
<Route path="/dashboard" component={Dashboard} />
<Route path="/revenue" component={RevenueReports} />
</App>
</Router>,
BrowserRouter
instead ofHashRouter
. You don't need to explicitly setbrowserHistory
withBrowserRouter
. – Davin Tryon Dec 7 '17 at 11:41