I'm creating an org chart using React and this library: https://github.com/bumbeishvili/org-chart. It uses D3 to create the org chart.
I want to use custom React components to style each node in the org chart, but when I try to set the node content to a React component, it returns {object Object}
instead of actually rendering the component.
Please take a look at this Stackblitz for reproducing the error: https://stackblitz.com/edit/d3-org-chart-react-integration-hooks-oysugz?file=OrgChart.js
Here I try to set the node content to <TestOrgCard/>
but as you can see, it does not render.
Does anyone have an idea how to render cards using custom React components?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment