React router seems to add the request to the end of my routes. The application is served by the node server on which the express is running. I am using the latest version of the jet router "1.0.0-rc1"
Example:
http://localhost:8080/#/users?_k=8wsy62
Two questions
1) Why is this happening?
2) How can I stop it when adding a request to a URL?
Here is the code that I still have:
var React = require('react');
var ReactRouter = require('react-router');
var Router = ReactRouter.Router;
var Route = ReactRouter.Route;
var Link = ReactRouter.Link;
var IndexRoute = ReactRouter.IndexRoute;
var App = React.createClass({
render: function() {
return (
<div className="app">
<h1>App</h1>
<Link to="/users">Users</Link>
{this.props.children}
</div>
);
}
});
var Home = React.createClass({
render: function() {
return (
<div className="home">
<h2>Home</h2>
</div>
);
}
});
var Users = React.createClass({
render: function() {
return (
<div className="users">
<h2>Users</h2>
</div>
);
}
});
React.render((
<Router>
<Route path="/" component={App}>
<IndexRoute component={Home} />
<Route path="users" component={Users} />
</Route>
</Router>
), document.body);
source
share