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

feat(Ref): add component #2142

Merged
merged 4 commits into from
Sep 30, 2017
Merged

feat(Ref): add component #2142

merged 4 commits into from
Sep 30, 2017

Conversation

layershifter
Copy link
Member

Splitted from #1879.

Why?

ref isn't a prop, it has a same behaviour as key - it never passed to a component. However, there were numerous issues about refs (#1740, #1602, #1849, #1732 and more) and it's time to make something in this way. document.querySelector is a workaround, but it's not a solution.

Problem is a well known in React's world, there is a long-live issue facebook/react#4213, there was also the RFC facebook/react#6974 from Dan.

Variants

Project Prop Example
formsy-react-components componentRef & innerRef refs.md
office-ui-fabric-react componentRef office-ui-fabric-react#1356
react-redux connect HOC, withRef reduxjs/react-redux@2d3d0be
react-router innerRef Link.md

This PR only adds Ref addon, all other work will be done in #1879.

layershifter and others added 3 commits September 29, 2017 10:07
(cherry picked from commit 48c6b57)
(cherry picked from commit 48c6b57)
(cherry picked from commit 48c6b57)
@codecov-io
Copy link

Codecov Report

Merging #2142 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2142      +/-   ##
==========================================
+ Coverage   99.76%   99.76%   +<.01%     
==========================================
  Files         150      151       +1     
  Lines        2597     2601       +4     
==========================================
+ Hits         2591     2595       +4     
  Misses          6        6
Impacted Files Coverage Δ
src/addons/Ref/Ref.js 100% <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 8ecb71d...3058cc1. Read the comment docs.

@levithomason levithomason merged commit 5a37f28 into master Sep 30, 2017
@levithomason
Copy link
Member

🎉

@levithomason levithomason deleted the feat/ref-split branch September 30, 2017 20:20
@levithomason
Copy link
Member

Released in semantic-ui-react@0.75.0

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

Successfully merging this pull request may close these issues.

None yet

3 participants