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

Support react-router 6.4+ #520

Closed
danielnixon opened this issue Jan 9, 2023 · 6 comments
Closed

Support react-router 6.4+ #520

danielnixon opened this issue Jan 9, 2023 · 6 comments

Comments

@danielnixon
Copy link
Member

danielnixon commented Jan 9, 2023

In v6.4, react-router swapped its History type/interface from the history package to the @remix-run/router package. That breaks the (hacky) hook we use (as documented in https://github.com/oaf-project/oaf-react-router#react-router-6) because this prop assignment is no longer the same type:

<HistoryRouter history={history}>
Property 'encodeLocation' is missing in type 'import("/.../node_modules/history/index").History' but required in type 'import("/.../node_modules/@remix-run/router/dist/history").History'.ts(2741)
@danielnixon
Copy link
Member Author

The solution is likely to replace:

import { unstable_HistoryRouter as HistoryRouter } from "react-router-dom";

with

import { HistoryRouter } from "redux-first-history/rr6";

@danielnixon
Copy link
Member Author

@danielnixon
Copy link
Member Author

@danielnixon danielnixon changed the title Support react-router 6.6.1 Support react-router 6.4+ Jan 9, 2023
@danielnixon
Copy link
Member Author

This might be it: fe6e9b2

@danielnixon
Copy link
Member Author

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