ReactJs this.props.router undefined
<p>Hello I am learning React js and I have came across a problem. When I try to change back to the main page using react router i get the following error:</p>
<blockquote>
<p>Uncaught TypeError: Cannot read property 'push' of undefined</p>
</blockquote>
<p>Here is my code, as you can see I am calling the navigate function:</p>
<p><a href="https://i.gyazo.com/f1ad9b68a33a4a470298756f3cd70f00.png" rel="nofollow noreferrer"><img src="https://i.gyazo.com/f1ad9b68a33a4a470298756f3cd70f00.png" alt="enter image description here" /></a></p>
<p>My client.js with router:</p>
<p><a href="https://i.stack.imgur.com/pbt1E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pbt1E.png" alt="enter image description here" /></a></p>
<p>If I replace <code>this.props.router.push('/');</code> with <code>this.props.history.push('/');</code> it works fine.
What could be the problem?</p>