I\'ve sometimes seen people wrap their components in withRouter when they are exporting them:
import { w
withRouter is a higher-order component that will pass the closest route's to get access to some property as to location and match from the props it can be accessed only if give the component the property located in the component
and same the match and location prosperity to be able to change the location and used this.props.history.push it should be provided for each component property must provide but when used WithRouter it can be access to location and match without add property history it can be accessed direction without add property history fro each Route.