I have got a problem with rerendering the component, when I switch to a different route and then back to my component. I am using React 0.14.3, react-router 1.0.2 and Immutable.js.
The reason is, that I compare props in my shouldComponentUpdate
method.
shouldComponentUpdate(nextProps, nextState) {
return !Immutable.is(nextProps.articles, this.props.articles);
}
If I change the route and go back, props.articles
does not change, but I need to rerender the page anyways.
The question is, what do I need to consider in my shouldComponentUpdate
method, to track, if the route has just changed?
Thanks in advance! Rico