Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

fix(innerRef): allow ref as object #409

Merged
merged 2 commits into from
Apr 10, 2018
Merged

fix(innerRef): allow ref as object #409

merged 2 commits into from
Apr 10, 2018

Conversation

viktorivarsson
Copy link
Contributor

React 16.3 comes with a createRef API where you can add ref as an object

What:
Allow innerRef to be passed as an object.

Why:
Because React 16.3 comes with a createRef API, the ref to elements is not only functions anymore, it may also be objects.

How:
I have updated prop type for the innerRef prop as well as the TypeScript interface.

Checklist:

  • Documentation N/A
  • Tests N/A
  • Ready to be merged
  • Added myself to contributors table

I have updated where I can see that we set types for innerRef, but it would be great if someone took a quick look as well.

I'm happy to update if there are adjustments needed.

React 16.3 comes with a createRef API where you can add ref as an object
kentcdodds
kentcdodds previously approved these changes Apr 9, 2018
Copy link
Contributor

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Super. Thanks!

@kentcdodds
Copy link
Contributor

Ah, looks like there's an issue with the snapshots. Could you run npm run test:update and commit and push the changes? Thanks!

@viktorivarsson
Copy link
Contributor Author

Just glad I was able to help! Snapshots are now updated.

@codecov-io
Copy link

Codecov Report

Merging #409 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #409   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          10     10           
  Lines         177    177           
  Branches       50     50           
=====================================
  Hits          177    177
Impacted Files Coverage Δ
src/create-glamorous.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edcc9b2...fa0c3e9. Read the comment docs.

Copy link
Contributor

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Thanks

@kentcdodds kentcdodds merged commit da564f1 into paypal:master Apr 10, 2018
@viktorivarsson viktorivarsson deleted the pr/inner-ref-object branch April 10, 2018 11:27
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.

3 participants