donatso/family-chart

How to perform clean up in useEffect

Closed this issue · 2 comments

so when I use state to toggle between views, it crashes when I try mounting back a tree component, works the first time but going back I get this.
image
Need a way to clean up when unmounting.

It seems that your family tree json is corrupted. I am not sure what is causing it. Can you try to isolate the problem?