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

fix inner ref #42

Merged
merged 6 commits into from
Oct 22, 2019
Merged

fix inner ref #42

merged 6 commits into from
Oct 22, 2019

Conversation

mshwery
Copy link
Contributor

@mshwery mshwery commented Oct 16, 2019

replaces #41

Makes innerRef a bit more accurate. This will need to target both v2.1.2 and v3.0.1

Copy link

@solon-aguiar solon-aguiar left a comment

Choose a reason for hiding this comment

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

looks good to me!

@tusbar
Copy link

tusbar commented Oct 21, 2019

Shouldn’t this also update the innerRef prop-types from box.tsx to support RefObject?

src/box.tsx Outdated Show resolved Hide resolved
@mshwery mshwery merged commit 5be1ca5 into master Oct 22, 2019
@mshwery mshwery deleted the task/fix-inner-ref branch October 22, 2019 15:03
mshwery pushed a commit that referenced this pull request Oct 22, 2019
* update innerRef

* wip

* support React.createRef refs

* wip
@vpryim-old
Copy link

Hi folks, have you been thinking about using React.forwardRef()? Is there any obstacle that prevents that?

@mshwery

@mshwery
Copy link
Contributor Author

mshwery commented Oct 23, 2019

@ActiveObject TBH we haven't really thought much about it since innerRef handles refs for you. Is there a use case you have that isn't currently covered by innerRef?

@vpryim-old
Copy link

@mshwery I had problems passing React.createRef() but looks like you've already covered that. Other from that innerRef handles all cases.

I still think ref would be more intuitive for devs, as we use the same name for the rest of basic elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants