I am working with reactjs and react router. I have create my router as:
ReactDOM.render(
<Router history={browserHistory}>
<Route exact path="/" component={App} />
<Route path="/:id" component={User} />
</Router>,
document.getElementById('root')
);
And in the App component I have a Link to the "/:id"
path :
<Link to={'/'+id} >
when I am in the "/" route, my view works fine but now when I click my link, the path changes and my view changes for an instant and then gives an error in the App component (It is the component of the other route) .
I use "react-router": "^2.8.1".
PS: the error is in the setinterval function in the component {App}.
Thanks for any help in advance
setInterval
?setinterval
function, theLink
and preferably the rest of it - it one chunk.