A
A
Alexander2018-07-05 23:06:20
recursion
Alexander, 2018-07-05 23:06:20

How to make a recursion on the descendant output block in the tree?

That's what I have, in fact, as I understand it, there is no way without recursion, how to organize this part of the code so that it multiplies, and does not overwrite with data? Should it be moved to a separate component?
5b3e796583d72384427673.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-07-05
@koshalex

Should it be moved to a separate component?

Yes. recursive component. When displaying a single element, check if it has nested data. If so, the component renders an instance of itself, passing it this data as a parameter. For example .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question