Closed lema-fr closed 3 years ago
Same problem
I had this problem, rendering the designated DOM elements, and then later rendering the setTimeout
to trigger the state change that adds the
You can use the delay
property to render lines after the target DOM elements are added. It uses setTimeout
under the hood.
@kdeloach
Hello, I'm using react-lineto in my app to draw lines between elements, but when a page is rendered for the first time, lines are not displaying correctly, for example, should be a vertical line between B&C, but when the page loads for the first time, this line doesn't go from "B" to "C", it goes way up from "C" and displays correctly only if I refresh the page or change screen size.
Could you please provide any tips on how to fix this?
Thank you.