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

User mentions: move React.forwardRef into the higher-order component #24518

Closed
bluefuton opened this issue Apr 27, 2018 · 1 comment
Closed
Labels
[Feature] Reader The reader site on Calypso. [Type] Enhancement

Comments

@bluefuton
Copy link
Contributor

Improvement to user mentions functionality added in #24287.

The higher-order component withUserMentions currently requires the wrapped component to do a React.forwardRef so we can access the DOM node. According to the docs, we can move this ref forwarding into the HOC itself:

https://reactjs.org/docs/forwarding-refs.html

@bluefuton
Copy link
Contributor Author

Some related discussion about Redux connect() and forwardRef:

reduxjs/react-redux#914

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Reader The reader site on Calypso. [Type] Enhancement
Projects
None yet
Development

No branches or pull requests

1 participant