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

TypeScript: history value from useHashHistory doesn't match history prop expected from HistoryRouter #35

Open
abouteiller-niji opened this issue Apr 2, 2023 · 0 comments

Comments

@abouteiller-niji
Copy link

There is a TS interface error since the version 6.4.2 of react-router-dom lib
The History interface differs from the one used in react-router-dom since version "1.0.3-pre.1" of @remix-run/router

The change comes from this PR : https://github.com/remix-run/react-router/pull/9496/files
merged between version "1.0.3-pre.0" and "1.0.3-pre.1" :

TS error is : TS2741: Property 'encodeLocation' is missing in type 'import("{...}/node_modules/history/index").History' but required in type 'import("{...}/node_modules/react-router-dom/node_modules/@remix-run/router/dist/history").History'.

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