I am using React 0.14.0, React Router 2.0.0-rc4, browserify 11.2.0, babelify 7.2.0.
Here is my router code:
render((
<Router history={browserHistory}>
<Route path="/" component={App}>
<IndexRoute component={Departments} />
<Route path="goals" component={Goals} />
<Route path="departments" component={Departments} >
<Route path="department" component={Department} />
</Route>
</Route>
</Router>
), document.getElementById('react-container'))
root/departments works fine but not root/departments/. root/departments/department doesn't work neither. I am not sure why.
Also it seems like any kind of parameter with :myParam is not recognized.
I can't see any difference between my code and the examples provided in the documentation.
Another strange thing is that I don't have the warning:
Warning: [react-router] Location "undefined" did not match any routes
I have:
Uncaught SyntaxError: Unexpected token < bundle.js:2
And if I click on the bundle.js link in the dev tools of chrome I arrive in the index.html (but bundle.js is the name of the tab).
The basic routes such as /, departements and goals work fine.
I am kind of stuck on this. Any advice would be helpful.
Full code available here: https://github.com/codeforabq/Open-Budget-ABQ/tree/dev
Thanks.