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 16.6 for react-router v3 #6806

Merged
merged 6 commits into from Jun 25, 2019

Conversation

arthur791004
Copy link

@arthur791004 arthur791004 commented Jun 24, 2019

Issues

#6766

Why

react router v3 supports components as props with format { [name]: component } according to this. However, newer react component may also be an objects, so it would make react-router v3 broken.

How to fix

Use isValidElementType is distinguish { [name]: component } and react components for React.memo, React.forwardRef, React.Fragment and so on

modules/RouterContext.js Outdated Show resolved Hide resolved
@timdorr
Copy link
Member

timdorr commented Jun 25, 2019

Awesome work! I'll try to get this pushed out today.

@timdorr timdorr merged commit 35e070c into remix-run:v3 Jun 25, 2019
@arthur791004
Copy link
Author

Thank you 🎉🎉🎉

@timdorr
Copy link
Member

timdorr commented Jun 25, 2019

3.2.2 is out! https://github.com/ReactTraining/react-router/releases/tag/v3.2.2

@mouhsinelonly
Copy link

Thank you

@dlong500
Copy link

@timdorr with the fixes for component types does this mean react-router 3 now officially supports react-redux 7.x?

@arthur791004
Copy link
Author

arthur791004 commented Jun 25, 2019

@dlong500 I hope it could. If you encounter any problem, please create an issue. I'll try to fix it if possible.

@timdorr
Copy link
Member

timdorr commented Jun 25, 2019

Yes, I believe it should be good with connected components now.

@Gethyl
Copy link

Gethyl commented Jun 26, 2019

Thanks @timdorr. I ran into the same issue yesterday, and today I see the fix is out :-)

I can confirm, react-router@3.2.2 works with react@16.8 and react-redux@7.1

@lock lock bot locked as resolved and limited conversation to collaborators Aug 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants