DannyBoy
SolidJS Universal - How does the method of tree creation get chosen?
I'm currently using SolidJS universal in order to dynamically create multiple trees of nodes as the primary tree is being built so that there is no need for traversal for every
insertNode()
. These other trees skip nodes that are in the primary tree, but still need to connect to nodes that are higher/lower in the tree, if that makes sense.
The trouble that I ran into was that in some cases (i.e. shallow trees), the tree is being created in a breadth-first approach. In other cases (i.e. wide/deep trees), the tree is being created in a depth-first approach. This makes it much more complex to know if nodes are being added bottom-up or top-down, and was wondering if there's a way to configure this, or know if there's a way of figuring out which method will be chosen. Thanks!12 replies