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

Link - add element shape for innerRef #6886

Merged
merged 1 commit into from
Aug 27, 2019
Merged

Link - add element shape for innerRef #6886

merged 1 commit into from
Aug 27, 2019

Conversation

nescalante
Copy link

@nescalante nescalante commented Aug 27, 2019

The innerRef property from the Link component is throwing a warning when using the React.createRef API introduced in React 16.3.

The warning is the following one:

Warning: Failed prop type: Invalid prop `innerRef` supplied to `Link`. in Link (created by MyComponent)

I am taking the approach suggested here. Basically adding the new shape to the valid types for this property.

Here you have a live example of the warning being thrown when using the innerRef prop with the createRef function:

https://codesandbox.io/s/react-router-v3-link-ref-ojj07

@timdorr
Copy link
Member

timdorr commented Aug 27, 2019

Ah, that's a good catch! Thanks!

@timdorr timdorr merged commit ee4fcff into remix-run:v3 Aug 27, 2019
@nescalante
Copy link
Author

Can you please publish this fix when possible?

@nescalante
Copy link
Author

Reasking due to inactivity, any chance to release this fix?

@lock lock bot locked as resolved and limited conversation to collaborators Nov 11, 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.

2 participants