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
#1211 - Deprecate withRef in favor of forwardRef and React.forwardRef #1271
Conversation
Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! 😄 |
@mrijke Did you sign the CLA? @DragonRaider5 care to review this? |
Hey @mrijke, first of all: thanks a lot for your contribution! 👍 🎉 I'll now do a small review and edit here if something comes to my mind which doesn't fit into the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for your work.
I'd be happy to discuss the changes that came to my mind, don't take them as "required".
In addition I'd love to help you change what I asked about if time doesn't allow you to do so.
3093755
to
842e03e
Compare
@redonkulus I did sign the CLA, is there anything I need to do to retrigger the check? |
Now that |
@DragonRaider5 I've removed the CLA webhook, so its ok to ignore now. |
Deprecate withRef and use forwardRef prop instead. When forwardRef is true, the ref passed to the injected component will be passed down to the wrapped component. Display a invariant message when withRef is used. Closes formatjs#1211.
38849aa
to
798a17a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, it's me once again 😆
I think this should be the last revision, just some tweaks to make the code easier to understand and one question.
Thanks in advance and have a nice weekend!
Refactor the call to withIntl to allow for HoC composing, such as: export default compose( connect(...conntextOptions), withIntl(intlOptions) ) This is done without changing the main API, options can still be passed in as second arguments to withIntl too. Add 'react-is' as a strict dependency, change the rollup config to be able to properly build with it.
798a17a
to
d4116ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution over the past weeks 🎉
To me this looks great, @redonkulus what do you think about merging?
Released in v3.0.0-beta-4! |
Hi! |
Deprecate withRef and use forwardRef prop instead.
When forwardRef is true, the ref passed to the injected component
will be passed down to the wrapped component.
Display a invariant message when withRef is used.
Closes #1211.
Since this is a breaking change it would be nice to have this for 3.0 :)