I wrap all componentDidMount to a useEffect hook, createRef with useRef hook.
I did a conditional if everything was mounted based on .current presence from the ref.
However it did not run as expected and returning the exact d3.select(...).transition is not a function error which I assume this was came from the family-chart that d3 module was not yet loaded, I've attached my code I working on this page.
Hi, I find this module interesting and tried to implement to NextJS based on code generated on https://donatso.github.io/family-chart/examples/create-tree/
I wrap all
componentDidMount
to auseEffect
hook,createRef
withuseRef
hook.I did a conditional if everything was mounted based on
.current
presence from the ref.However it did not run as expected and returning the exact
d3.select(...).transition is not a function
error which I assume this was came from thefamily-chart
that d3 module was not yet loaded, I've attached my code I working on this page.