crubier / react-graph-vis

A react component to render nice graphs using vis.js
http://crubier.github.io/react-graph-vis/
MIT License
946 stars 170 forks source link

Graph not unloading? #131

Open daliborfilus opened 2 years ago

daliborfilus commented 2 years ago

Hello, thank you for this react component. I have an issue, where I have this graph component in a functional (pure) react component inside a Material UI tab. Then I load a 300-node graph, which is rendering somewhat slowly, but consistently. But when I switch tabs, the browser remains laggy. When I switch tabs back to the graph, the graph is properly re-drawn, but is now much slower. Switching tabs back and forth just increases the lag.

Looking at the code, it seems to me that you don't unload the visjs network graph on component dismount?