Open jadenmazzone opened 3 years ago
This is actually the same issue as: https://github.com/danielcaldas/react-d3-graph/issues/472. Essentially, if d3 is set in the config and the graph is non-static, any state change will change the positions of the nodes on the graph.
Describe the bug When setting a state variable in a useEffect causes the graph to not render properly.
To Reproduce Steps to reproduce the behavior:
Expected behavior The graph rendering should not be affected by changing the state of a variable that doesn't have anything to do with the graph.
Screenshots If applicable, add screenshots to help explain your problem.
(1)
(2)
(1) (2)
Environment:
OS: macOS Browser: chrome Version: 90 Node version: 14.15.4 react-d3-graph version: 2.6.0 d3 version: 5.16.0 react version: 16.13.1
Additional context Add any other context about the problem here.