TabsBar refers to router, which is a private context property of react-router. withRouter is a recommended alternative. It also allows to track location changes even if React.PureComponent is used.