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

Added RefObject as valid Link innerRef #6567

Merged
merged 3 commits into from Jan 31, 2019
Merged

Added RefObject as valid Link innerRef #6567

merged 3 commits into from Jan 31, 2019

Conversation

gcangussu
Copy link
Contributor

When using React.createRef() with the innerRef prop of a Link, a false positive prop-types error appears. But it works perfectly.

This PR adds the shape of a RefObject (name for React.createRef() return type) as a valid prop type for Link's innerRef.

@timdorr
Copy link
Member

timdorr commented Jan 31, 2019

Seems like a no brainer to me. Thanks for the docs and test!

@timdorr timdorr merged commit 89a72d5 into remix-run:master Jan 31, 2019
@serchavalos
Copy link

@timdorr 👋 Is there an ETA on when this fix will be released?

@pshrmn
Copy link
Contributor

pshrmn commented Mar 2, 2019

@danhilltech Oof, yeah, Element is a DOM API. This StackOverflow answer suggests an empty function polyfill for Node.

@danhilltech
Copy link

Ah thanks! Sorry, I removed my original as it realized it wasn't a super helpful report. Will try and polyfill now, thanks!

@pshrmn
Copy link
Contributor

pshrmn commented Mar 2, 2019

I added a polyfill in #6607.

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

5 participants