Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RouteComponentProps error with react v17 and react-router-dom v5 #107

Open
edu-amr opened this issue Aug 11, 2023 · 0 comments
Open

RouteComponentProps error with react v17 and react-router-dom v5 #107

edu-amr opened this issue Aug 11, 2023 · 0 comments

Comments

@edu-amr
Copy link

edu-amr commented Aug 11, 2023

Description

I'm using react v17 with react-router-dom v5 and I'm having a problem with imports and types, where type.d.ts sends a message saying "history is not defined" and The module' "react-router-dom" ' has no exported member 'RouteComponentProps'.ts(2305).

I saw that many are having the problem with the latest version, but I am having an error with an older version, I tried to use react v18 with RRD v5 but I had other problems.

Steps to reproduce

Follow steps described in documentation to reproduze a same reduce

  • React v17
  • React-router-dom v5

Expected result

React guards function return a component or router in page

Actual result

"type.d.ts sends a message saying "history is not defined" and The module' "react-router-dom" ' has no exported member 'RouteComponentProps'.ts(2305)."

Environment

  • OS: win 10
  • Browser and its version: [Chrome 115 on Windows 10]
  • React Router DOM version: v5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant