I am using Node with Webpack-Dev-Server and React-Router.
In my app.js
file I have:
<Router history={browserHistory}>
<Route path="/" component={Layout}>
<IndexRoute component={FindFriends} />
<Route path="/you" component={YouAndYourFriends} />
</Route>
</Router>
Using browserHistory
the browser returns an error: Cannot GET /you
When I change browserHistory
to hashHistory
, everything works fine.
Where is my mistake? Or what should you do using browserHistory
?