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

Add innerRef prop to components #140

Closed
dylanmoz opened this issue Sep 5, 2017 · 2 comments
Closed

Add innerRef prop to components #140

dylanmoz opened this issue Sep 5, 2017 · 2 comments

Comments

@dylanmoz
Copy link
Contributor

dylanmoz commented Sep 5, 2017

It would be nice to be able to get the underlying ref node for some of the components. For example, for this line chart I made, I needed to modify @vx/shape's LinePath to take an innerRef prop that would then assign it to the path element's ref. This way I could gain access to the svg path element, and glean some data from it (path.getTotalLength() and path.getPointAtLength()) Other libraries that I know of that do something similar are glamorous and styled-components.

Thoughts?

@hshoff
Copy link
Member

hshoff commented Sep 10, 2017

yup will make refs opt-in

@mdugue
Copy link

mdugue commented Oct 13, 2020

since forwardRef is part of react nowadays, wouldn't it make sense to change innerRef to ref?

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

No branches or pull requests

3 participants