How can I update a ReactJS component based on URL / path when using React-Router?
The code below works, but is this the correct way to do this? Seems like a lot of code
In react-router 2.0.0 you can use the hashHistory or browserHistory:
browserHistory.listen(function(ev) { console.log('listen', ev.pathname); }); {routes}