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

Improve component displayName in React 16 #38

Open
vhfmag opened this issue Jun 19, 2019 · 0 comments
Open

Improve component displayName in React 16 #38

vhfmag opened this issue Jun 19, 2019 · 0 comments

Comments

@vhfmag
Copy link

vhfmag commented Jun 19, 2019

When used in a React 16 context, the final component (the result of uncontrollable(MyComp)) has the rather opaque name ForwardRef (demo: https://r4qeq.codesandbox.io/)

If you find it worth the effort, I could submit a tiny PR giving a display name to the function passed to forwardRef (https://github.com/jquense/uncontrollable/blob/master/src/uncontrollable.js#L122-L124), hence renaming the final component to something like ForwardRef(myFunctionName). The displayName variable (https://github.com/jquense/uncontrollable/blob/master/src/uncontrollable.js#L6) could be used for this.

Thank you for this library (and many others)!

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

No branches or pull requests

1 participant