kdeloach / react-lineto

Draw a line between two elements in React
MIT License
234 stars 63 forks source link

Support for ref #28

Closed olso closed 3 years ago

olso commented 5 years ago

To avoid using className we could use https://reactjs.org/docs/refs-and-the-dom.html

radoslavkarlik commented 3 years ago

It's been almost 2 years without any reply but I can see no reason for not doing so as it seems really intuitive that way.

kdeloach commented 3 years ago

You don't always have a ref to the objects you'd like to connect. Using class name allows you to connect objects without having to pass references. Of course, PRs are welcome.