Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: added support for React Router 6 #260

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

Merged
mxschmitt merged 1 commit into master from upgrade-react-router
Nov 17, 2021
Merged

Conversation

Copy link
Member

@mxschmitt mxschmitt commented Aug 27, 2020
edited
Loading

Not sure if it was worth it.

There were quite a lot of changes in React router 6: https://github.com/ReactTraining/react-router/blob/dev/docs/advanced-guides/migrating-5-to-6.md

Fixes #259

We would need a minor release after that since <6 seem to be not supported anymore.

Salzian, sam2schwab, and dawidof reacted with thumbs up emoji
@mxschmitt mxschmitt changed the title (削除) chore: added support for React Router 6 (削除ここまで) (追記) feat: added support for React Router 6 (追記ここまで) Aug 27, 2020
...props
}) => {
const navigate = useNavigate();
const href = useHref(typeof to === 'string' ? { pathname: to } : to);
Copy link
Member

@kyletsang kyletsang Aug 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just pass to here as is? Looks like useHref will parse both object and string forms.

Copy link
Member

jquense commented Sep 2, 2020

I'm not well equipped to review this since i don't use react-router!

Copy link
Member Author

I'm not well equipped to review this since i don't use react-router!

Then I would say let's wait if more users request that change and then decide to ship it.

Copy link
Member Author

@jquense seems like #262 is one of the first users who face into that issue. Lets release a major version with v6 support or what's your opinion on that?

Copy link
Member Author

@kyletsang anything else required to change in this PR or shall we follow-up with something?

Copy link
Member

I think this should be good. I'll play around with it after it's merged and see if there's anything extra to add. Thanks for making all these changes!

mxschmitt reacted with heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@kyletsang kyletsang kyletsang approved these changes

@taion taion Awaiting requested review from taion

@jquense jquense Awaiting requested review from jquense

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Exception with react-router v6: (0, _reactRouterDom.withRouter)(LinkContainer) is not a function

AltStyle によって変換されたページ (->オリジナル) /