Open sharpk1 opened 1 year ago
It can happens cause your data is not ready when <Tree />
renders.
For example:
1) React renders <Tree />
components
2) Your data for tree is requested, but server do not answer yet, data is not ready
3) Your data
variable is passed in <Tree />
component
4) You get this error
Hello all! I am trying to get the tree to render some data that comes from a parent component. I am able to render it correctly when I use test data that is super simple and then change the code live to my tree data. I am using a ternary to handle when the data is coming in and still no luck. My component is like so:
Here is what
treeData[10]
spits outFeel free to delete any questions that do not apply.
Are you reporting a bug, or opening a feature request?
Bug
What is the actual behavior/output?
What is the behavior/output you expect?
Expecting the tree to render, it works when I render simple test data then go in the code and change it to my dynamic data
Can you consistently reproduce the issue/create a reproduction case (e.g. on https://codesandbox.io)?
I cannot
What version of react-d3-tree are you using?
3.5.0
If react-d3-tree crashed with a traceback, please paste the full traceback below.
See the screenshot, not sure what to capture that.