I'm using <Route /> from react-router-dom for routing and Nav + LinkContainer from react-bootstrap + react-router-bootstrap for navigation:
//...
<Route path="/shop/" component={Shop} />
//...
<NavItem caption="Home" path="/" />
<NavItem caption="Shop" path="/shop" />
//...
// with a helper component:
const NavItem = (props) => {
return (
<LinkContainer to={props.path} >
<Nav.Link> {props.caption} </Nav.Link>
</LinkContainer>
)
}
This creates an URL with a hash sign in it, e.g.:
http://localhost:3000/#/shop
Where does this come from, what is it good for? Everything is working fine anyway, but this hash sign isn't smart, I think. Can I avoid it?