---
title: "Discussion on \"React router v5 - TypeError history is undefined\" | Hashnode"
description: "Discussion on \"React router v5 - TypeError history is undefined\". Recently I was adding react router (version 5.1.7) to my side project. I wanted to add a redirect after a certain button is pressed. \nUnfortunately, I was receiving TypeError: history is undefined every button was pressed. It took me a while, but the..."
url: "https://hashnode.com/posts/react-router-v5-typeerror-history-is-undefined/64e07dab3fc2bfa9d8cc6ac1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [React router v5 - TypeError history is undefined](https://cucumbersome.net/react-router-v5-typeerror-history-is-undefined?utm_source=hashnode&utm_medium=feed)

Recently I was adding react router (version 5.1.7) to my side project. I wanted to add a redirect after a certain button is pressed. Unfortunately, I was receiving TypeError: history is undefined every button was pressed. It took me a while, but the...

Jan 17, 2021 · 2 min read · cucumbersome.net  
Read the article

## Written by

[Michal Gutowski](https://hashnode.com/@cucumbersome)

@cucumbersome

  
[View profile](https://hashnode.com/@cucumbersome)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
