![Trying to render a new component on click using useHistory. Keep getting "TypeError: Cannot read property 'push' of undefined" : r/learnjavascript Trying to render a new component on click using useHistory. Keep getting "TypeError: Cannot read property 'push' of undefined" : r/learnjavascript](https://external-preview.redd.it/hbBUAZK6iZW13PeatVMwqi2tbQuLxPXaPMMjFrP2sMc.jpg?auto=webp&s=16028ff35fa1e61c89589c4a0f78c5e0191a581a)
Trying to render a new component on click using useHistory. Keep getting "TypeError: Cannot read property 'push' of undefined" : r/learnjavascript
![history.push(path) is not working in react-router-dom v4, with redux while redirecting to 404 - Stack Overflow history.push(path) is not working in react-router-dom v4, with redux while redirecting to 404 - Stack Overflow](https://i.stack.imgur.com/wXfrr.png)
history.push(path) is not working in react-router-dom v4, with redux while redirecting to 404 - Stack Overflow
![How To Pass Multiple Route Parameters in a React URL Path | by Paige Niedringhaus | Better Programming How To Pass Multiple Route Parameters in a React URL Path | by Paige Niedringhaus | Better Programming](https://miro.medium.com/max/2000/1*QBsTm5ANOfcoI696VqBZKw.png)
How To Pass Multiple Route Parameters in a React URL Path | by Paige Niedringhaus | Better Programming
![history.push(path) is not working in react-router-dom v4, with redux while redirecting to 404 - Stack Overflow history.push(path) is not working in react-router-dom v4, with redux while redirecting to 404 - Stack Overflow](https://i.stack.imgur.com/Pv1XR.png)
history.push(path) is not working in react-router-dom v4, with redux while redirecting to 404 - Stack Overflow
![How To Pass Multiple Route Parameters in a React URL Path | by Paige Niedringhaus | Better Programming How To Pass Multiple Route Parameters in a React URL Path | by Paige Niedringhaus | Better Programming](https://miro.medium.com/max/2000/1*NQ2JNAqFHppRof5BLshhMw.png)