stkvtflw stkvtflw - 3 months ago 59
React JSX Question

React router change url without page reload

When I was using react-router 0.13.3, it was ok: i was changing url and transition without reload was happening.

Now, in react-router 2.0 if I'm changing url manually, my app gets reloaded entirely instead of simple redirect.
How do i fix it?

I want to use this:

<a href="/routename">link</a>

instead this:

<Link to="/routename">link</Link>

In few special cases.


import {Router, Route, IndexRoute} from "react-router";
import App from './components/App';
import FrontPage from './components/frontPage/FrontPage';
import User from './components/user/User';
module.exports = (
<Route path="/" component={App}>
<IndexRoute component={FrontPage}/>
<Route path="/user/:userid" component={User}/>


There is no solution. We can either onClick script or Link.