For anyone looking for a solution using React 16.8+ (hooks) and React Router 5:
You can change the route using a button with the following code:
<button onClick={() => props.history.push("path")}>
React Router provides some props to your components, including the push() function on history which works pretty much like the < Link to='path' > element.
You don't need to wrap your components with the Higher Order Component "withRouter" to get access to those props.